Skip to content

Commit 8bfa3b8

Browse files
authoredMay 18, 2024
Fix type to enable compilation (libretro#92)
Before this commit I got a compilation error about type mismatch between short int * and unsigned char *. To keep the buffer size intact, I double the number of elements since char is usually half the size of short int. Co-authored-by: Piotr Paweł Stefaniak <[email protected]>
1 parent 410d7bf commit 8bfa3b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎libretro/core-mapper.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ unsigned long Ktime=0 , LastFPSTime=0;
2626
#endif
2727

2828
//SOUND
29-
short signed int SNDBUF[1024*2];
29+
unsigned char SNDBUF[1024*2*2];
3030
int snd_sampler_pal = 44100 / 50;
3131
int snd_sampler_ntsc = 44100 / 60;
3232

‎libretro/libretro-core.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ extern int ToggleTV;
135135
extern int CURRENT_TV;
136136

137137
extern int SHIFTON, pauseg, SND;
138-
extern short signed int SNDBUF[1024 * 2];
138+
extern unsigned char SNDBUF[];
139139

140140
char RPATH[512];
141141
char RETRO_DIR[512];

0 commit comments

Comments
 (0)
Please sign in to comment.