libretro, gcc14 fixes

This commit is contained in:
kub 2024-06-20 20:13:29 +02:00
parent cbb9a09837
commit 60ef69d631

View file

@ -223,17 +223,18 @@ void cache_flush_d_inval_i(void *start, void *end)
{ {
#ifdef __arm__ #ifdef __arm__
size_t len = (char *)end - (char *)start; size_t len = (char *)end - (char *)start;
(void)len;
#if defined(__BLACKBERRY_QNX__) #if defined(__BLACKBERRY_QNX__)
msync(start, end - start, MS_SYNC | MS_CACHE_ONLY | MS_INVALIDATE_ICACHE); msync(start, len, MS_SYNC | MS_CACHE_ONLY | MS_INVALIDATE_ICACHE);
#elif defined(__MACH__) #elif defined(__MACH__)
sys_dcache_flush(start, len); sys_dcache_flush(start, len);
sys_icache_invalidate(start, len); sys_icache_invalidate(start, len);
#elif defined(_3DS) #elif defined(_3DS)
(void)len;
ctr_flush_invalidate_cache(); ctr_flush_invalidate_cache();
#elif defined(VITA) #elif defined(VITA)
sceKernelSyncVMDomain(sceBlock, start, len); sceKernelSyncVMDomain(sceBlock, start, len);
#else #else
(void)len;
__clear_cache(start, end); __clear_cache(start, end);
#endif #endif
#endif #endif
@ -550,7 +551,7 @@ void emu_video_mode_change(int start_line, int line_count, int start_col, int co
vm_current_start_col = start_col; vm_current_start_col = start_col;
vm_current_col_count = col_count; vm_current_col_count = col_count;
// 8bit renderes create a 328x256 CLUT image, while 16bit creates 320x240 RGB // 8bit renderers create a 328x256 CLUT image, 16bit creates 320x240 RGB
#if defined(RENDER_GSKIT_PS2) #if defined(RENDER_GSKIT_PS2)
// calculate the borders of the real image inside the picodrive image // calculate the borders of the real image inside the picodrive image
vout_width = (vout_16bit ? VOUT_MAX_WIDTH : VOUT_8BIT_WIDTH); vout_width = (vout_16bit ? VOUT_MAX_WIDTH : VOUT_8BIT_WIDTH);
@ -1661,7 +1662,7 @@ unsigned retro_get_region(void)
void *retro_get_memory_data(unsigned type) void *retro_get_memory_data(unsigned type)
{ {
uint8_t* data; void *data;
switch(type) switch(type)
{ {
@ -1679,6 +1680,12 @@ void *retro_get_memory_data(unsigned type)
else else
data = PicoMem.ram; data = PicoMem.ram;
break; break;
case RETRO_MEMORY_VIDEO_RAM:
data = PicoMem.vram;
break;
case 4:
data = PicoMem.cram;
break;
default: default:
data = NULL; data = NULL;
break; break;