mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
(3DS) can compile with latest ctrulib/great-refactor.
fix some warnings.
This commit is contained in:
parent
27152a4486
commit
7f5ae4bdba
17
Makefile.ctr
17
Makefile.ctr
@ -1,12 +1,13 @@
|
||||
TARGET := retroarch_3ds
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
GRIFFIN_BUILD = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 1
|
||||
BUILD_CIA = 1
|
||||
DEBUG = 0
|
||||
GRIFFIN_BUILD = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 1
|
||||
BUILD_CIA = 1
|
||||
LIBCTRU_NO_DEPRECATION = 1
|
||||
|
||||
APP_TITLE = Retroarch 3DS
|
||||
APP_DESCRIPTION = Retroarch 3DS
|
||||
@ -278,6 +279,10 @@ else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(LIBCTRU_NO_DEPRECATION), 1)
|
||||
CFLAGS += -DLIBCTRU_NO_DEPRECATION
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
|
@ -121,8 +121,8 @@ static void *ctr_csnd_audio_init(const char *device, unsigned rate, unsigned lat
|
||||
|
||||
ctr->pos = 0;
|
||||
|
||||
GSPGPU_FlushDataCache(ctr->l_paddr, CTR_CSND_AUDIO_SIZE);
|
||||
GSPGPU_FlushDataCache(ctr->r_paddr, CTR_CSND_AUDIO_SIZE);
|
||||
GSPGPU_FlushDataCache((void*)ctr->l_paddr, CTR_CSND_AUDIO_SIZE);
|
||||
GSPGPU_FlushDataCache((void*)ctr->r_paddr, CTR_CSND_AUDIO_SIZE);
|
||||
csndPlaySound_custom(0x8, SOUND_LOOPMODE(CSND_LOOPMODE_NORMAL)| SOUND_FORMAT(CSND_ENCODING_PCM16),
|
||||
1.0, -1.0, ctr->l, ctr->l, CTR_CSND_AUDIO_SIZE);
|
||||
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
static void svchax_gspwn(u32 dst, u32 src, u32 size, u8* flush_buffer)
|
||||
{
|
||||
extern Handle gspEvents[GSPEVENT_MAX];
|
||||
extern Handle gspEvents[GSPGPU_EVENT_MAX];
|
||||
|
||||
memcpy(flush_buffer, flush_buffer + 0x4000, 0x4000);
|
||||
GSPGPU_InvalidateDataCache(dst, size);
|
||||
GSPGPU_FlushDataCache(src, size);
|
||||
GSPGPU_InvalidateDataCache((void*)dst, size);
|
||||
GSPGPU_FlushDataCache((void*)src, size);
|
||||
memcpy(flush_buffer, flush_buffer + 0x4000, 0x4000);
|
||||
|
||||
svcClearEvent(gspEvents[GSPEVENT_PPF]);
|
||||
GX_TextureCopy(src, 0, dst, 0, size, 8);
|
||||
svcWaitSynchronization(gspEvents[GSPEVENT_PPF], U64_MAX);
|
||||
svcClearEvent(gspEvents[GSPGPU_EVENT_PPF]);
|
||||
GX_TextureCopy((void*)src, 0, (void*)dst, 0, size, 8);
|
||||
svcWaitSynchronization(gspEvents[GSPGPU_EVENT_PPF], U64_MAX);
|
||||
|
||||
memcpy(flush_buffer, flush_buffer + 0x4000, 0x4000);
|
||||
}
|
||||
@ -123,7 +123,7 @@ u32 __ctr_svchax = 0;
|
||||
|
||||
void svchax_init(void)
|
||||
{
|
||||
extern u32 __service_ptr;
|
||||
extern void* __service_ptr;
|
||||
|
||||
if (__ctr_svchax)
|
||||
return;
|
||||
|
@ -21,7 +21,7 @@ extern u32 __heap_size_hbl;
|
||||
|
||||
extern void (*__system_retAddr)(void);
|
||||
|
||||
void __destroy_handle_list(void);
|
||||
void envDestroyHandles(void);
|
||||
void __appExit();
|
||||
void __libc_fini_array(void);
|
||||
|
||||
@ -111,7 +111,7 @@ void __attribute__((noreturn)) __libctru_exit(int rc)
|
||||
svcControlMemory(&tmp, __stack_bottom, 0x0, __stack_size_extra, MEMOP_FREE, 0x0);
|
||||
|
||||
// Close some handles
|
||||
__destroy_handle_list();
|
||||
envDestroyHandles();
|
||||
|
||||
if (__sync_fini)
|
||||
__sync_fini();
|
||||
|
@ -131,6 +131,7 @@ static void frontend_ctr_deinit(void *data)
|
||||
}
|
||||
|
||||
cfguExit();
|
||||
// exitCfgu();
|
||||
ndspExit();
|
||||
csndExit();
|
||||
gfxExit();
|
||||
@ -224,6 +225,7 @@ static void frontend_ctr_init(void *data)
|
||||
if(ndspInit() != 0)
|
||||
*dsp_audio_driver = audio_null;
|
||||
cfguInit();
|
||||
// initCfgu();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ static void ctr_update_viewport(ctr_video_t* ctr)
|
||||
}
|
||||
|
||||
|
||||
static void ctr_lcd_aptHook(int hook, void* param)
|
||||
static void ctr_lcd_aptHook(APT_HookType hook, void* param)
|
||||
{
|
||||
ctr_video_t *ctr = (ctr_video_t*)param;
|
||||
if(!ctr)
|
||||
@ -355,7 +355,7 @@ static void* ctr_init(const video_info_t* video,
|
||||
sizeof(ctr_vertex_t));
|
||||
GPUCMD_Finalize();
|
||||
ctrGuFlushAndRun(true);
|
||||
gspWaitForEvent(GSPEVENT_P3D, false);
|
||||
gspWaitForEvent(GSPGPU_EVENT_P3D, false);
|
||||
|
||||
if (input && input_data)
|
||||
{
|
||||
@ -400,7 +400,7 @@ static bool ctr_frame(void* data, const void* frame,
|
||||
|
||||
if (!width || !height)
|
||||
{
|
||||
gspWaitForEvent(GSPEVENT_VBlank0, true);
|
||||
gspWaitForEvent(GSPGPU_EVENT_VBlank0, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -440,17 +440,17 @@ static bool ctr_frame(void* data, const void* frame,
|
||||
ctr->lcd_buttom_on = !ctr->lcd_buttom_on;
|
||||
}
|
||||
|
||||
svcWaitSynchronization(gspEvents[GSPEVENT_P3D], 20000000);
|
||||
svcClearEvent(gspEvents[GSPEVENT_P3D]);
|
||||
svcWaitSynchronization(gspEvents[GSPEVENT_PPF], 20000000);
|
||||
svcClearEvent(gspEvents[GSPEVENT_PPF]);
|
||||
svcWaitSynchronization(gspEvents[GSPGPU_EVENT_P3D], 20000000);
|
||||
svcClearEvent(gspEvents[GSPGPU_EVENT_P3D]);
|
||||
svcWaitSynchronization(gspEvents[GSPGPU_EVENT_PPF], 20000000);
|
||||
svcClearEvent(gspEvents[GSPGPU_EVENT_PPF]);
|
||||
|
||||
frames++;
|
||||
|
||||
if (ctr->vsync)
|
||||
svcWaitSynchronization(gspEvents[GSPEVENT_VBlank0], U64_MAX);
|
||||
svcWaitSynchronization(gspEvents[GSPGPU_EVENT_VBlank0], U64_MAX);
|
||||
|
||||
svcClearEvent(gspEvents[GSPEVENT_VBlank0]);
|
||||
svcClearEvent(gspEvents[GSPGPU_EVENT_VBlank0]);
|
||||
|
||||
currentTick = svcGetSystemTick();
|
||||
diff = currentTick - lastTick;
|
||||
|
@ -61,7 +61,7 @@ void wait_for_input(void);
|
||||
#endif
|
||||
|
||||
|
||||
extern Handle gspEvents[GSPEVENT_MAX];
|
||||
extern Handle gspEvents[GSPGPU_EVENT_MAX];
|
||||
extern u32* gpuCmdBuf;
|
||||
extern u32 gpuCmdBufOffset;
|
||||
extern u32 __linear_heap_size;
|
||||
@ -109,7 +109,7 @@ static INLINE Result ctrGuSetCommandList_First(bool queued, u32* buf0a, u32 buf0
|
||||
gxCommand[6]=(u32)buf2s; //buf2 size
|
||||
gxCommand[7]=0x0;
|
||||
|
||||
return GSPGPU_SubmitGxCommand(gxCmdBuf, gxCommand);
|
||||
return gspSubmitGxCommand(gxCmdBuf, gxCommand);
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
@ -123,7 +123,7 @@ static INLINE Result ctrGuSetCommandList_Last(bool queued, u32* buf0a, u32 buf0s
|
||||
gxCommand[4]=gxCommand[5]=gxCommand[6]=0x0;
|
||||
gxCommand[7]=(flags>>1)&1; //when non-zero, call svcFlushProcessDataCache() with the specified buffer
|
||||
|
||||
return GSPGPU_SubmitGxCommand(gxCmdBuf, gxCommand);
|
||||
return gspSubmitGxCommand(gxCmdBuf, gxCommand);
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
@ -147,7 +147,7 @@ static INLINE Result ctrGuSetMemoryFill(bool queued, u32* buf0a, u32 buf0v, u32*
|
||||
gxCommand[6]=(u32)buf1e; //buf1 end addr
|
||||
gxCommand[7]=(width0)|(width1<<16);
|
||||
|
||||
return GSPGPU_SubmitGxCommand(gxCmdBuf, gxCommand);
|
||||
return gspSubmitGxCommand(gxCmdBuf, gxCommand);
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
@ -169,7 +169,7 @@ static INLINE Result ctrGuCopyImage
|
||||
| ((dst_w > src_w) ? CTRGU_DMA_TRUNCATE : 0);
|
||||
gxCommand[6]=gxCommand[7]=0x0;
|
||||
|
||||
return GSPGPU_SubmitGxCommand(gxCmdBuf, gxCommand);
|
||||
return gspSubmitGxCommand(gxCmdBuf, gxCommand);
|
||||
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ static INLINE Result ctrGuDisplayTransfer
|
||||
gxCommand[5]=(src_fmt << 8) | (dst_fmt << 12) | multisample_lvl;
|
||||
gxCommand[6]=gxCommand[7]=0x0;
|
||||
|
||||
return GSPGPU_SubmitGxCommand(gxCmdBuf, gxCommand);
|
||||
return gspSubmitGxCommand(gxCmdBuf, gxCommand);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user