Skip to content

Commit

Permalink
Buildfix2
Browse files Browse the repository at this point in the history
  • Loading branch information
negativeExponent committed Jan 18, 2024
1 parent 6f6ee87 commit 8bbf758
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions libretro/libretro.c
Original file line number Diff line number Diff line change
Expand Up @@ -1580,13 +1580,11 @@ void retro_deinit(void) {
FCEUI_Kill();
#if defined(_3DS)
linearFree(fceu_video_out);
#else
#if !defined(PS2) || !defined(PSP)
#elif !defined(PS2) || !defined(PSP)
if (fceu_video_out)
free(fceu_video_out);
fceu_video_out = NULL;
#endif
#endif
#if defined(PS2)
ps2 = NULL;
#endif
Expand Down Expand Up @@ -1859,16 +1857,16 @@ bool retro_load_game(const struct retro_game_info *info) {
serialize_size = 0;

check_system_specs();
#if defined(_3DS)
fceu_video_out = (uint16_t *)linearMemAlign(256 * 240 * sizeof(uint16_t), 128);
#elif !defined(PS2) || !defined(PSP) /* PS2 targets uses hw buffers for video */
#if defined(HAVE_NTSC_FILTER)
#define FB_WIDTH 768
#define FB_HEIGHT 512
#else /* !HAVE_NTSC_FILTER */
#define FB_WIDTH NES_WIDTH
#define FB_HEIGHT NES_HEIGHT
#endif
#if defined(_3DS)
fceu_video_out = (uint16_t *)linearMemAlign(256 * 240 * sizeof(uint16_t), 128);
#elif !defined(PS2) || !defined(PSP) /* PS2 targets uses hw buffers for video */
fceu_video_out = (uint16_t *)malloc(FB_WIDTH * FB_HEIGHT * sizeof(uint16_t));
#endif /* !PS2 */

Expand Down Expand Up @@ -1982,7 +1980,7 @@ void retro_unload_game(void) {
#if defined(_3DS)
if (fceu_video_out)
linearFree(fceu_video_out);
#else
#elif !defined(PS2) || !defined(PSP)
if (fceu_video_out)
free(fceu_video_out);
fceu_video_out = NULL;
Expand Down

0 comments on commit 8bbf758

Please sign in to comment.