diff --git a/core/cd_hw/libchdr/deps/libFLAC/include/share/compat.h b/core/cd_hw/libchdr/deps/libFLAC/include/share/compat.h index dcb9350..744aabb 100644 --- a/core/cd_hw/libchdr/deps/libFLAC/include/share/compat.h +++ b/core/cd_hw/libchdr/deps/libFLAC/include/share/compat.h @@ -53,7 +53,7 @@ #define fseeko _fseeki64 #define ftello _ftelli64 #else /* MinGW */ -#if !defined(HAVE_FSEEKO) +#if !defined(HAVE_FSEEKO) && !defined(__MINGW64_VERSION_MAJOR) #define fseeko fseeko64 #define ftello ftello64 #endif diff --git a/sdl/Makefile.sdl1 b/sdl/Makefile.sdl1 index 681a31a..4a8699e 100644 --- a/sdl/Makefile.sdl1 +++ b/sdl/Makefile.sdl1 @@ -28,7 +28,7 @@ NAME = gen_sdl CC = gcc -CFLAGS = `sdl-config --cflags` -march=native -O6 -fomit-frame-pointer -Wall -Wno-strict-aliasing -ansi -std=c99 -pedantic-errors +CFLAGS = `sdl-config --cflags` -march=native -O6 -fomit-frame-pointer -Wall -Wno-strict-aliasing -std=c99 -pedantic-errors #-g -ggdb -pg #-fomit-frame-pointer #LDFLAGS = -pg diff --git a/sdl/Makefile.sdl2 b/sdl/Makefile.sdl2 index ac5c497..03bbce4 100644 --- a/sdl/Makefile.sdl2 +++ b/sdl/Makefile.sdl2 @@ -28,7 +28,7 @@ NAME = gen_sdl2 CC = gcc -CFLAGS = `sdl2-config --cflags` -march=native -O6 -fomit-frame-pointer -Wall -Wno-strict-aliasing -ansi -std=c99 -pedantic-errors +CFLAGS = `sdl2-config --cflags` -march=native -O6 -fomit-frame-pointer -Wall -Wno-strict-aliasing -std=c99 -pedantic-errors #-g -ggdb -pg #-fomit-frame-pointer #LDFLAGS = -pg diff --git a/sdl/sdl1/main.c b/sdl/sdl1/main.c index c4ab724..fefcb5e 100644 --- a/sdl/sdl1/main.c +++ b/sdl/sdl1/main.c @@ -244,10 +244,7 @@ static void sdl_video_update() static void sdl_video_close() { - if (sdl_video.surf_bitmap) - SDL_FreeSurface(sdl_video.surf_bitmap); - if (sdl_video.surf_screen) - SDL_FreeSurface(sdl_video.surf_screen); + SDL_FreeSurface(sdl_video.surf_bitmap); } /* Timer Sync */ diff --git a/sdl/sdl2/main.c b/sdl/sdl2/main.c index 6121f71..7e9b6ef 100644 --- a/sdl/sdl2/main.c +++ b/sdl/sdl2/main.c @@ -150,7 +150,7 @@ static int sdl_video_init() } sdl_video.window = SDL_CreateWindow("Genesis Plus GX", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, VIDEO_WIDTH, VIDEO_HEIGHT, fullscreen); sdl_video.surf_screen = SDL_GetWindowSurface(sdl_video.window); - sdl_video.surf_bitmap = SDL_CreateRGBSurfaceWithFormat(SDL_SWSURFACE, 720, 576, SDL_BITSPERPIXEL(surface_format), surface_format); + sdl_video.surf_bitmap = SDL_CreateRGBSurfaceWithFormat(0, 720, 576, SDL_BITSPERPIXEL(surface_format), surface_format); sdl_video.frames_rendered = 0; SDL_ShowCursor(0); return 1; @@ -250,10 +250,8 @@ static void sdl_video_update() static void sdl_video_close() { - if (sdl_video.surf_bitmap) - SDL_FreeSurface(sdl_video.surf_bitmap); - if (sdl_video.surf_screen) - SDL_FreeSurface(sdl_video.surf_screen); + SDL_FreeSurface(sdl_video.surf_bitmap); + SDL_DestroyWindow(sdl_video.window); } /* Timer Sync */