Compilation with SDL2 (to be finalized) > API=sdl2 make

This commit is contained in:
Thomas Bernard
2018-05-28 17:00:46 +02:00
parent 5c761ace2c
commit d86efa58e4
9 changed files with 236 additions and 19 deletions

View File

@@ -38,14 +38,15 @@
#ifndef _MSC_VER
#include <unistd.h>
#endif
#if defined(USE_SDL) || defined(USE_SDL2)
#include <SDL.h>
#include <SDL_image.h>
// There is no WM on the GP2X...
#if !defined(__GP2X__) && !defined(__WIZ__) && !defined(__CAANOO__) && !defined(GCWZERO)
#include <SDL_syswm.h>
#endif
#endif
#include "const.h"
#include "struct.h"
@@ -623,6 +624,7 @@ int Init_program(int argc,char * argv[])
Spare.time_of_safety_backup = 0;
#if defined(USE_SDL) || defined(USE_SDL2)
// SDL
if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK) < 0)
{
@@ -630,11 +632,14 @@ int Init_program(int argc,char * argv[])
printf("Couldn't initialize SDL.\n");
return(0);
}
#endif
//Joystick = SDL_JoystickOpen(0);
#if defined(USE_SDL)
SDL_EnableKeyRepeat(250, 32);
SDL_EnableUNICODE(SDL_ENABLE);
SDL_WM_SetCaption("GrafX2","GrafX2");
#endif
Define_icon();
// Texte