mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-10 21:05:12 +01:00
Merge pull request #237 from Clownacy/master
[SDL] Fixes for SDL, and a fix for building under MinGW-w64
This commit is contained in:
commit
3f6560ab7f
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/* Timer Sync */
|
||||
|
@ -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_DestroyWindow(sdl_video.window);
|
||||
}
|
||||
|
||||
/* Timer Sync */
|
||||
|
Loading…
Reference in New Issue
Block a user