diff --git a/apps/lang/turkce.lang b/apps/lang/turkce.lang
index f8cd2e1c96..204311cbf7 100644
--- a/apps/lang/turkce.lang
+++ b/apps/lang/turkce.lang
@@ -1718,8 +1718,8 @@
*: none
rtc: "Açma Tuşu = Ayarla"
- gigabeat*,iaudiom5,iaudiox5,ipod*,iriverh10,iriverh10_5gb,mrobe100,sansac200*,sansaclip*,sansaconnect,sansae200*,sansafuze*: "SEÇ Tuşu = Ayarla"
aigoerosq,erosqnative,gogearsa9200,samsungyh*,xduoox3*: "PLAY Tuşu = Ayarla"
+ gigabeat*,iaudiom5,iaudiox5,ipod*,iriverh10,iriverh10_5gb,mrobe100,sansac200*,sansaclip*,sansaconnect,sansae200*,sansafuze*: "SEÇ Tuşu = Ayarla"
iriverh100,iriverh120,iriverh300: "NAVI Tuşu = Ayarla"
mpiohd300: "Tamam Tuşu = Ayarla"
mrobe500: "Kalp Tuşu = Ayarla"
@@ -1727,7 +1727,6 @@
*: none
- gigabeat*,gogearsa9200,iaudiom5,iaudiox5,ipod*,iriverh10,iriverh100,iriverh10_5gb,iriverh120,iriverh300,mrobe100,rtc,samsungyh*,sansac200*,sansae200*: ""
@@ -1751,8 +1750,8 @@
*: none
rtc: "OFF = Geri Döndür"
- gigabeatfx,mrobe500: "POWER = Geri Döndür"
aigoerosq,erosqnative,gigabeats,sansafuzeplus,xduoox3*: "LEFT = Revert"
+ gigabeatfx,mrobe500: "POWER = Geri Döndür"
gogearsa9200: "LEFT = Geri Döndür"
iaudiom5,iaudiox5: "RECORD = Geri Döndür"
ipod*,mpiohd300,sansac200*: "MENU = Geri Döndür"
@@ -1764,7 +1763,6 @@
*: none
- gigabeat*,gogearsa9200,iaudiom5,iaudiox5,ipod*,iriverh10,iriverh100,iriverh10_5gb,iriverh120,iriverh300,mrobe100,rtc,samsungyh*,sansac200*,sansae200*: ""
@@ -3457,23 +3455,6 @@
*: "Güçlü"
-
- id: LANG_BATTERY_TYPE
- desc: deprecated
- user: core
-
- *: none
- battery_types: ""
-
-
- *: none
- battery_types: ""
-
-
- *: none
- battery_types: ""
-
-
id: LANG_FREQUENCY
desc: in recording and playback settings
@@ -4894,7 +4875,7 @@
*: "%s açılamadı"
- *: ""
+ *: "Eklenti açılamadı"
@@ -7547,20 +7528,6 @@
*: "Makeup Kazanç"
-
- id: LANG_CATALOG
- desc: deprecated
- user: core
-
- *: ""
-
-
- *: ""
-
-
- *: ""
-
-
id: LANG_SPLIT_TYPE
desc: in record timesplit options
@@ -9134,23 +9101,6 @@
*: "Albüm Kazancı"
-
- id: LANG_BATTERY_TYPE_2
- desc: deprecated
- user: core
-
- *: none
- battery_types,xduoox3: ""
-
-
- *: none
- battery_types,xduoox3: ""
-
-
- *: none
- battery_types,xduoox3: ""
-
-
id: LANG_AUTO
desc: in sound settings
@@ -10524,11 +10474,11 @@
*: none
- radio: "Taranıyor %d.%02d MHz"
+ radio: "%d taranıyor.%02d MHz"
*: none
- radio: ""
+ radio: "Taranıyor"
@@ -11040,10 +10990,10 @@
*: "Failed reading %s"
- *: "Okunamadı %s"
+ *: "%s okunamadı"
- *: ""
+ *: "Dosya okunamadı"
@@ -11895,23 +11845,6 @@
*: "Skip"
-
- id: LANG_BATTERY_TYPE_1
- desc: deprecated
- user: core
-
- *: none
- battery_types,xduoox3: ""
-
-
- *: none
- battery_types,xduoox3: ""
-
-
- *: none
- battery_types,xduoox3: ""
-
-
id: LANG_ID3_ALBUMARTIST
desc: in tag viewer
@@ -12490,20 +12423,6 @@
*: "Geçen parça"
-
- id: LANG_PLAYTIME_REMAINING
- desc: deprecated
- user: core
-
- *: ""
-
-
- *: ""
-
-
- *: ""
-
-
id: LANG_PLAYTIME_TRK_REMAINING
desc: playing time screen
@@ -12588,20 +12507,6 @@
*: "Ortalama bit hızı"
-
- id: LANG_PLAYTIME_ERROR
- desc: playing time screen
- user: core
-
- *: "Error while gathering info"
-
-
- *: "Bilgi toplanırken hata oluştu"
-
-
- *: "Bilgi toplanırken hata oluştu"
-
-
id: LANG_PLAYING_TIME
desc: onplay menu
@@ -14056,16 +13961,16 @@
id: LANG_TOGGLE_ITEM
- desc: in main_menu_config
+ desc: deprecated
user: core
- *: "Toggle Item"
+ *: ""
- *: "Öğeyi Aç/Kapat"
+ *: ""
- *: "Öğeyi Aç Kapat"
+ *: ""
@@ -14126,13 +14031,13 @@
id: LANG_MAIN_MENU_ORDER
- desc: main_menu_config plugin title
+ desc: deprecated
user: core
- *: "Rockbox Main Menu Order"
+ *: ""
- *: "Rockbox Ana Menü Sıralaması"
+ *: ""
*: ""
@@ -14635,20 +14540,6 @@
*: "Albüm resmi bulunamadı"
-
- id: LANG_CACHE_REBUILT_NEXT_RESTART
- desc: deprecated
- user: core
-
- *: ""
-
-
- *: ""
-
-
- *: ""
-
-
id: LANG_ERROR_WRITING_CONFIG
desc: in the pictureflow splash messages
@@ -14781,7 +14672,7 @@
user: core
*: "Press LEFT to cancel."
- android,hifietma*,zenvision: "Press BACK to cancel."
+ android,hifietma*: "Press BACK to cancel."
cowond2,creativezenxfi2,ibassodx50,ibassodx90,mrobe500,ondavx747: "Press POWER to cancel."
ihifi760,ihifi960: "Double tap RETURN to cancel."
ihifi770,ihifi770c,ihifi800: "Press HOME to cancel."
@@ -14796,14 +14687,14 @@
*: "İptal etmek için SOL tuşuna basın."
- android,hifietma*,zenvision: "İptal etmek için GERİ tuşuna basın."
+ android,hifietma*: "İptal etmek için GERİ tuşuna basın."
cowond2,creativezenxfi2,ibassodx50,ibassodx90,mrobe500,ondavx747: "İptal etmek için GÜÇ'e basın."
ihifi760,ihifi960: "İptal etmek için GERİ DÖN'e iki kez dokunun."
ihifi770,ihifi770c,ihifi800: "İptal etmek için EV TUŞUNA basın."
iriverh10: "Dİptal etmek için SOL'a iki kez dokunun."
+ samsungyh*: "İptal etmek için SOL'a iki kez dokunun."
mpiohd200,mpiohd300: "İptal etmek için KAYIT'a iki kez dokunun."
rx27generic: "İptal etmek için VOLUME'a basın."
- samsungyh*: "İptal etmek için SOL'a iki kez dokunun."
sonynwza860: "Tuş haritaları eksik."
touchscreen: "İptal etmek için Orta Sol'a basın."
vibe500: "İptal etmek için PREV'e basın."
@@ -14811,7 +14702,7 @@
*: "İptal etmek için SOL tuşuna basın."
- android,hifietma*,zenvision: "İptal etmek için GERİ tuşuna basın."
+ android,hifietma*: "İptal etmek için GERİ tuşuna basın."
cowond2,creativezenxfi2,ibassodx50,ibassodx90,mrobe500,ondavx747: "İptal etmek için GÜÇ'e basın."
ihifi760,ihifi960: "İptal etmek için GERİ DÖN'e iki kez dokunun."
ihifi770,ihifi770c,ihifi800: "İptal etmek için EV TUŞUNA basın."
@@ -15305,7 +15196,7 @@
id: LANG_VOICED_DATE_FORMAT
- desc: format string for how dates will be read back. Y == 4-digit year, A == month name, m == numeric month, d == numeric day. For example, "AdY" will read "January 21 2021"
+ desc: format string for how dates will be read back. Y == 4-digit year (grouped), y == 4-digit year (numeric), A == month name, m == numeric month, d == numeric day. For example, for 2021-01-05, "AdY" will be voiced as "January 5 twenty twenty-one" and "dmy" will be voiced as "5 1 two thousand twenty one
user: core
*: "dAY"
@@ -15926,20 +15817,6 @@
*: "Varsayılan Tarayıcı"
-
- id: LANG_AMAZE_MENU
- desc: Amaze game
- user: core
-
- *: "Amaze Main Menu"
-
-
- *: "Amaze Ana Menü"
-
-
- *: "Amaze Ana Menü"
-
-
id: LANG_SET_MAZE_SIZE
desc: Maze size in Amaze game
@@ -16276,34 +16153,6 @@
*: "Mik mod Ayarları"
-
- id: LANG_MIKMOD_MENU
- desc: mikmod plugin
- user: core
-
- *: "Mikmod Menu"
-
-
- *: "Mikmod Menüsü"
-
-
- *: "Mik mod Menüsü"
-
-
-
- id: LANG_CHESSBOX_MENU
- desc: chessbox plugin
- user: core
-
- *: "Chessbox Menu"
-
-
- *: "Chessbox Menüsü"
-
-
- *: "Satranç kutusu Menüsü"
-
-
id: VOICE_INVALID_VOICE_FILE
desc: played if the voice file fails to load
@@ -16985,3 +16834,144 @@
*: "Şuna göre parçalar"
+
+ id: LANG_USB_DAC
+ desc: in settings_menu
+ user: core
+
+ *: none
+ usbdac: "USB-DAC"
+
+
+ *: none
+ usbdac: "USB-DAC"
+
+
+ *: none
+ usbdac: "USB-DAC"
+
+
+
+ id: LANG_WHILE_USB_CHARGE_ONLY
+ desc: in settings_menu
+ user: core
+
+ *: none
+ usbdac: "While In USB Charge-Only Mode"
+
+
+ *: none
+ usbdac: "USB sadece şarj modundayken"
+
+
+ *: none
+ usbdac: "USB sadece şarj modundayken"
+
+
+
+ id: LANG_WHILE_MASS_STORAGE_USB_ONLY
+ desc: in settings_menu
+ user: core
+
+ *: none
+ usbdac: "While In USB Mass-Storage Mode"
+
+
+ *: none
+ usbdac: "USB yığın depolama modundayken"
+
+
+ *: none
+ usbdac: "USB yığın depolama modundayken"
+
+
+
+ id: LANG_USB_DAC_ACTIVE
+ desc: for splash
+ user: core
+
+ *: none
+ usbdac: "USB-DAC Active"
+
+
+ *: none
+ usbdac: "USB-DAC Aktif"
+
+
+ *: none
+ usbdac: "USB-DAC Aktif"
+
+
+
+ id: LANG_ANNOUNCE_STATUS
+ desc: announnnce_status plugin
+ user: core
+
+ *: "Announce Status"
+
+
+ *: "Durumu Bildir"
+
+
+ *: "Durumu Bildir"
+
+
+
+ id: LANG_TAGNAVI_ALL_TRACKS_SORTED_BY_ALBUM
+ desc: "[By album]" entry in tag browser
+ user: core
+
+ *: "[By album]"
+
+
+ *: "[Albüme göre]"
+
+
+ *: "Albüme göre sıralanmış parçalar"
+
+
+
+ id: LANG_SORT_PLAYLISTS
+ desc: playlists sorting setting
+ user: core
+
+ *: "Sort Playlists"
+
+
+ *: "Çalma Listelerini Sırala"
+
+
+ *: "çalma listelerini sırala"
+
+
+
+ id: LANG_USE_LED_INDICATORS
+ desc: LED indicators setting
+ user: core
+
+ *: none
+ general_purpose_led: "Use LED indicators"
+
+
+ *: none
+ general_purpose_led: "LED göstergesini kullanın"
+
+
+ *: none
+ general_purpose_led: "LED göstergesini kullanın"
+
+
+
+ id: LANG_KEEP_DIRECTORY
+ desc: file browser setting
+ user: core
+
+ *: "Always remember last folder"
+
+
+ *: "En son dosyayı her zaman hatırla"
+
+
+ *: "En son dosyayı her zaman hatırla"
+
+
diff --git a/apps/plugins/lib/keymaps.h b/apps/plugins/lib/keymaps.h
index f5194ee053..1570b5a19a 100644
--- a/apps/plugins/lib/keymaps.h
+++ b/apps/plugins/lib/keymaps.h
@@ -310,7 +310,8 @@
(CONFIG_KEYPAD != ONDAVX777_PAD) && \
(CONFIG_KEYPAD != CREATIVE_ZENXFI2_PAD) && \
(CONFIG_KEYPAD != SHANLING_Q1_PAD) && \
- (CONFIG_KEYPAD != HIBY_R3PROII_PAD)
+ (CONFIG_KEYPAD != HIBY_R3PROII_PAD) && \
+ (CONFIG_KEYPAD != CTRU_PAD)
#define BTN_FIRE BUTTON_BOTTOMLEFT
#define BTN_PAUSE BUTTON_TOPLEFT
#endif
diff --git a/apps/plugins/plugin_crt0.c b/apps/plugins/plugin_crt0.c
index 4358f65aa9..0265b1af58 100644
--- a/apps/plugins/plugin_crt0.c
+++ b/apps/plugins/plugin_crt0.c
@@ -28,7 +28,7 @@ PLUGIN_HEADER
#ifdef CTRU
/* dummy undefined symbols to build plugins for ctru */
void __aeabi_unwind_cpp_pr0(void) {}
-struct _reent * _EXFUN(__getreent, (void)) {}
+struct _reent * _EXFUN(__getreent, (void)) { return NULL; }
#endif
/*
diff --git a/firmware/kernel/thread-common.c b/firmware/kernel/thread-common.c
index 074af1b7e1..326b8ea1cd 100644
--- a/firmware/kernel/thread-common.c
+++ b/firmware/kernel/thread-common.c
@@ -231,7 +231,7 @@ void format_thread_name(char *buf, size_t bufsize,
snprintf(buf, bufsize, fmt, name, thread->id);
}
-#ifndef HAVE_SDL_THREADS
+#if !defined(HAVE_SDL_THREADS) && !defined(CTRU)
/*---------------------------------------------------------------------------
* Returns the maximum percentage of the stack ever used during runtime.
*---------------------------------------------------------------------------
@@ -252,7 +252,7 @@ static unsigned int stack_usage(uintptr_t *stackptr, size_t stack_size)
return usage;
}
-#endif /* HAVE_SDL_THREADS */
+#endif /* !defined(HAVE_SDL_THREADS) && !defined(CTRU) */
#if NUM_CORES > 1
int core_get_debug_info(unsigned int core, struct core_debug_info *infop)
diff --git a/firmware/target/hosted/ctru/backlight-ctru.c b/firmware/target/hosted/ctru/backlight-ctru.c
index 8d45ba0b84..f72ea46d1e 100644
--- a/firmware/target/hosted/ctru/backlight-ctru.c
+++ b/firmware/target/hosted/ctru/backlight-ctru.c
@@ -23,6 +23,10 @@
#include
#include
#include
+
+#include <3ds/services/gsplcd.h>
+#include <3ds/result.h>
+
#include "config.h"
#include "backlight-target.h"
#include "sysfs.h"
@@ -30,8 +34,6 @@
#include "lcd.h"
#include "debug.h"
-#include <3ds/services/gsplcd.h>
-#include <3ds/result.h>
#include "luminance-ctru.h"
/* TODO: To use calibrated values in rockbox,
diff --git a/firmware/target/hosted/ctru/button-ctru.c b/firmware/target/hosted/ctru/button-ctru.c
index c28d7e56ae..59dfffef67 100644
--- a/firmware/target/hosted/ctru/button-ctru.c
+++ b/firmware/target/hosted/ctru/button-ctru.c
@@ -22,6 +22,13 @@
#include
#include /* EXIT_SUCCESS */
#include
+
+#include <3ds/types.h>
+#include <3ds/services/apt.h>
+#include <3ds/services/hid.h>
+#include <3ds/services/mcuhwc.h>
+#include <3ds/services/dsp.h>
+
#include "config.h"
#include "button.h"
#include "kernel.h"
@@ -38,12 +45,6 @@
#include "touchscreen.h"
-#include <3ds/types.h>
-#include <3ds/services/apt.h>
-#include <3ds/services/hid.h>
-#include <3ds/services/mcuhwc.h>
-#include <3ds/services/dsp.h>
-
static u8 old_slider_level = 0;
static int last_y, last_x;
@@ -136,9 +137,6 @@ int button_read_device(int* data)
if (kDown & KEY_DDOWN) {
key |= BUTTON_DOWN;
}
- if (kDown & KEY_START) {
- key |= BUTTON_POWER;
- }
touchPosition touch;
hidTouchRead(&touch);
diff --git a/firmware/target/hosted/ctru/filesystem-ctru.c b/firmware/target/hosted/ctru/filesystem-ctru.c
index 607a2e2ed6..5643afe8c3 100644
--- a/firmware/target/hosted/ctru/filesystem-ctru.c
+++ b/firmware/target/hosted/ctru/filesystem-ctru.c
@@ -24,6 +24,9 @@
#include
#include
#include
+
+#include <3ds/archive.h>
+
#include "config.h"
#include "system.h"
#include "file.h"
@@ -33,8 +36,6 @@
#include "pathfuncs.h"
#include "string-extra.h"
-#include <3ds/archive.h>
-
void paths_init(void)
{
/* is this needed in 3DS? */
diff --git a/firmware/target/hosted/ctru/lc-ctru.c b/firmware/target/hosted/ctru/lc-ctru.c
index 84b0e4534d..286944eed3 100644
--- a/firmware/target/hosted/ctru/lc-ctru.c
+++ b/firmware/target/hosted/ctru/lc-ctru.c
@@ -19,9 +19,15 @@
*
****************************************************************************/
#define RB_FILESYSTEM_OS
-#include
#include
#include
+
+/* this is part of CTRDL and includes 3ds.h */
+#include
+#ifdef RGB565
+#undef RGB565
+#endif
+
#include "system.h"
#include "load_code.h"
#include "filesystem-ctru.h"
diff --git a/firmware/target/hosted/ctru/lcd-bitmap.c b/firmware/target/hosted/ctru/lcd-bitmap.c
index 571857b9f3..53efbeabca 100644
--- a/firmware/target/hosted/ctru/lcd-bitmap.c
+++ b/firmware/target/hosted/ctru/lcd-bitmap.c
@@ -22,17 +22,22 @@
#include
#include
#include
+
+#include <3ds/gfx.h>
+#ifdef RGB565
+#undef RGB565
+#endif
+
+#include <3ds/allocator/linear.h>
+#include <3ds/console.h>
+#include <3ds/services/cfgu.h>
+
#include "debug.h"
#include "system.h"
#include "button-ctru.h"
#include "screendump.h"
#include "lcd-target.h"
-#include <3ds/gfx.h>
-#include <3ds/allocator/linear.h>
-#include <3ds/console.h>
-#include <3ds/services/cfgu.h>
-
/*#define LOGF_ENABLE*/
#include "logf.h"
@@ -186,7 +191,7 @@ void lcd_init_device(void)
/* hidInit(); */
u16 fb_width, fb_height;
- u8* fb = gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, &fb_width, &fb_height);
+ gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, &fb_width, &fb_height);
u32 bufsize = fb_width * fb_height * 2;
dev_fb = (fb_data *) linearAlloc(bufsize);
diff --git a/firmware/target/hosted/ctru/lib/bfile/bfile-internal.h b/firmware/target/hosted/ctru/lib/bfile/bfile-internal.h
index 24618d3fc2..62977a68ad 100644
--- a/firmware/target/hosted/ctru/lib/bfile/bfile-internal.h
+++ b/firmware/target/hosted/ctru/lib/bfile/bfile-internal.h
@@ -10,6 +10,10 @@
#include
#include <3ds/gfx.h>
+#ifdef RGB565
+#undef RGB565
+#endif
+
#include <3ds/svc.h>
#include <3ds/types.h>
#include <3ds/thread.h>
diff --git a/firmware/target/hosted/ctru/lib/sys_dir.c b/firmware/target/hosted/ctru/lib/sys_dir.c
index b997178900..f657d6c15e 100644
--- a/firmware/target/hosted/ctru/lib/sys_dir.c
+++ b/firmware/target/hosted/ctru/lib/sys_dir.c
@@ -19,19 +19,22 @@
*
****************************************************************************/
#define DIRFUNCTIONS_DEFINED
-#include "config.h"
#include
#include
+#include "fs_defines.h"
+
+#include <3ds/archive.h>
+#include <3ds/util/utf.h>
+/* this includes a couple of 3ds headers */
+#include "sys_file.h"
+
+#include "config.h"
#include "debug.h"
#include "dir.h"
#include "pathfuncs.h"
#include "timefuncs.h"
#include "system.h"
-#include "fs_defines.h"
-#include "sys_file.h"
-#include <3ds/archive.h>
-#include <3ds/util/utf.h>
/* This file is based on firmware/common/dir.c */
diff --git a/firmware/target/hosted/ctru/lib/sys_file.c b/firmware/target/hosted/ctru/lib/sys_file.c
index 4370627362..6a40cd659f 100644
--- a/firmware/target/hosted/ctru/lib/sys_file.c
+++ b/firmware/target/hosted/ctru/lib/sys_file.c
@@ -18,19 +18,22 @@
* KIND, either express or implied.
*
****************************************************************************/
-#define RB_FILESYSTEM_OS
-#include "config.h"
-#include "system.h"
#include
#include
#include
#include
#include
+#include "fs_defines.h"
+
+/* this includes a couple of 3ds headers */
+#include "sys_file.h"
+
+#define RB_FILESYSTEM_OS
+#include "config.h"
+#include "system.h"
#include "file.h"
#include "debug.h"
#include "string-extra.h"
-#include "fs_defines.h"
-#include "sys_file.h"
/* This file is based on firmware/common/file.c */
diff --git a/firmware/target/hosted/ctru/lib/sys_thread.h b/firmware/target/hosted/ctru/lib/sys_thread.h
index c951668993..a11a1b3bb4 100644
--- a/firmware/target/hosted/ctru/lib/sys_thread.h
+++ b/firmware/target/hosted/ctru/lib/sys_thread.h
@@ -22,12 +22,12 @@
#ifndef __SYSTHREAD_H__
#define __SYSTHREAD_H__
-#include "thread.h"
-
#include <3ds/synchronization.h>
#include <3ds/thread.h>
#include <3ds/services/apt.h>
+#include "thread.h"
+
/* Complementary atomic operations */
bool _AtomicCAS(u32 *ptr, int oldval, int newval);
#define AtomicGet(ptr) __atomic_load_n((u32*)(ptr), __ATOMIC_SEQ_CST)
diff --git a/firmware/target/hosted/ctru/lib/sys_timer.c b/firmware/target/hosted/ctru/lib/sys_timer.c
index a38d7ca032..60123e6025 100644
--- a/firmware/target/hosted/ctru/lib/sys_timer.c
+++ b/firmware/target/hosted/ctru/lib/sys_timer.c
@@ -24,13 +24,15 @@
#include
#include
#include
-#include "debug.h"
-#include "logf.h"
#include <3ds/os.h>
+/* these include a couple of 3ds headers */
#include "sys_thread.h"
#include "sys_timer.h"
+#include "debug.h"
+#include "logf.h"
+
#define CACHELINE_SIZE 128
static bool ticks_started = false;
@@ -283,7 +285,7 @@ void sys_timer_quit(void)
/* Shutdown the timer thread */
if (data->thread) {
LightSemaphore_Release(&data->sem, 1);
- Result res = threadJoin(data->thread, U64_MAX);
+ threadJoin(data->thread, U64_MAX);
threadFree(data->thread);
data->thread = NULL;
}
diff --git a/firmware/target/hosted/ctru/pcm-ctru.c b/firmware/target/hosted/ctru/pcm-ctru.c
index da941ecc31..048809fa93 100644
--- a/firmware/target/hosted/ctru/pcm-ctru.c
+++ b/firmware/target/hosted/ctru/pcm-ctru.c
@@ -27,6 +27,13 @@
#include
#include
#include
+
+#include <3ds/ndsp/ndsp.h>
+#include <3ds/ndsp/channel.h>
+#include <3ds/services/dsp.h>
+#include <3ds/synchronization.h>
+#include <3ds/allocator/linear.h>
+
#include "config.h"
#include "debug.h"
#include "sound.h"
@@ -47,12 +54,6 @@
#include "pcm_mixer.h"
#include "pcm_sink.h"
-#include <3ds/ndsp/ndsp.h>
-#include <3ds/ndsp/channel.h>
-#include <3ds/services/dsp.h>
-#include <3ds/synchronization.h>
-#include <3ds/allocator/linear.h>
-
/*#define LOGF_ENABLE*/
#include "logf.h"
diff --git a/firmware/target/hosted/ctru/powermgmt-ctru.c b/firmware/target/hosted/ctru/powermgmt-ctru.c
index 063abf7a7b..85db163e4c 100644
--- a/firmware/target/hosted/ctru/powermgmt-ctru.c
+++ b/firmware/target/hosted/ctru/powermgmt-ctru.c
@@ -22,6 +22,11 @@
#include
#include
+#include <3ds/types.h>
+#include <3ds/result.h>
+#include <3ds/services/mcuhwc.h>
+#include <3ds/services/ptmu.h>
+
#include "config.h"
#include "kernel.h"
#include "powermgmt.h"
@@ -30,11 +35,6 @@
#include "system.h"
#include "debug.h"
-#include <3ds/types.h>
-#include <3ds/result.h>
-#include <3ds/services/mcuhwc.h>
-#include <3ds/services/ptmu.h>
-
void mcuhwc_init(void)
{
Result result = mcuHwcInit();
diff --git a/firmware/target/hosted/ctru/system-ctru.c b/firmware/target/hosted/ctru/system-ctru.c
index a091e889c6..777e15bbe8 100644
--- a/firmware/target/hosted/ctru/system-ctru.c
+++ b/firmware/target/hosted/ctru/system-ctru.c
@@ -23,6 +23,14 @@
#include
#include
#include
+
+/* this includes a couple of 3ds headers */
+#include "bfile.h"
+
+#include <3ds/types.h>
+#include <3ds/allocator/linear.h>
+#include <3ds/services/cfgu.h>
+
#include "system.h"
#include "kernel.h"
#include "thread-ctru.h"
@@ -32,11 +40,6 @@
#include "panic.h"
#include "debug.h"
-#include <3ds/types.h>
-#include <3ds/allocator/linear.h>
-#include <3ds/services/cfgu.h>
-#include "bfile.h"
-
const char *audiodev = NULL;
#ifdef DEBUG
@@ -94,7 +97,7 @@ void system_init(void)
svcGetThreadPriority(&main_thread_priority, CUR_THREAD_HANDLE);
if (main_thread_priority != 0x30) {
- DEBUGF("warning, main_thread_priority = 0x%x\n", main_thread_priority);
+ DEBUGF("warning, main_thread_priority = 0x%lx\n", main_thread_priority);
}
/* check for New 3DS model */
diff --git a/firmware/target/hosted/ctru/system-ctru.h b/firmware/target/hosted/ctru/system-ctru.h
index 23c63a3c0c..53a01e0b5f 100644
--- a/firmware/target/hosted/ctru/system-ctru.h
+++ b/firmware/target/hosted/ctru/system-ctru.h
@@ -23,12 +23,16 @@
#include
#include
-#include "config.h"
-#include "gcc_extensions.h"
#include <3ds/types.h>
#include <3ds/svc.h>
#include "sys_timer.h"
+#ifdef BIT
+#undef BIT
+#endif
+
+#include "config.h"
+#include "gcc_extensions.h"
#define HIGHEST_IRQ_LEVEL 1
diff --git a/lib/rbcodec/codecs/codec_crt0.c b/lib/rbcodec/codecs/codec_crt0.c
index 4a4dd8ee82..e95b3e31e6 100644
--- a/lib/rbcodec/codecs/codec_crt0.c
+++ b/lib/rbcodec/codecs/codec_crt0.c
@@ -34,7 +34,7 @@ int _start(void) {return 0;}
#ifdef CTRU
/* dummy undefined symbols */
void __aeabi_unwind_cpp_pr0(void) {}
-struct _reent * _EXFUN(__getreent, (void)) {}
+struct _reent * _EXFUN(__getreent, (void)) { return NULL; }
#endif
enum codec_status codec_start(enum codec_entry_call_reason reason)
diff --git a/tools/configure b/tools/configure
index cf15942b35..f67058e44f 100755
--- a/tools/configure
+++ b/tools/configure
@@ -939,7 +939,7 @@ devkitarmcc () {
GCCOPTS=`echo $GCCOPTS | sed -e s/\ -Os/\ -Og/`
fi
- GCCOPTS="$GCCOPTS -fno-builtin -g -Wno-unused-result"
+ GCCOPTS="$GCCOPTS -fno-builtin -g -Wno-unused-result -Wno-char-subscripts"
GCCOPTS="$GCCOPTS -I$DEVKITPRO/libctru/include -I$DEVKITPRO/portlibs/3ds/include"
GCCOPTS="$GCCOPTS -mword-relocations -ffunction-sections -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft"
GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -D_REENTRANT -masm-syntax-unified"