Commit cb06d5ac authored by CeRiAl's avatar CeRiAl

GUI-SDL: Compilation fixes

parent 9eea0a87
#include "sysconfig.h"
#include "sysdeps.h"
#include "options.h"
#include "uae.h"
#include <SDL.h> #include <SDL.h>
#include "inputmode.h" #include "inputmode.h"
extern char launchDir[MAX_PATH]; extern char launchDir[MAX_PATH];
extern SDL_Surface *prSDLScreen; extern SDL_Surface *prSDLScreen;
static SDL_Surface *ksur; static SDL_Surface *ksur;
static SDL_Surface *inputMode[3]; static SDL_Surface *inputMode[3];
int show_inputmode = 0; int show_inputmode = 0;
int inputmode_init (void) { int inputmode_init (void) {
int i; int i;
char tmpchar[MAX_PATH]; char tmpchar[MAX_PATH];
SDL_Surface* tmp; SDL_Surface* tmp;
sprintf(tmpchar, "%s/images/joystick.bmp", launchDir); sprintf(tmpchar, "%s/images/joystick.bmp", launchDir);
tmp = SDL_LoadBMP(tmpchar); tmp = SDL_LoadBMP(tmpchar);
...@@ -20,35 +26,35 @@ int inputmode_init (void) { ...@@ -20,35 +26,35 @@ int inputmode_init (void) {
inputMode[0] = SDL_DisplayFormat(tmp); inputMode[0] = SDL_DisplayFormat(tmp);
SDL_FreeSurface(tmp); SDL_FreeSurface(tmp);
} }
sprintf(tmpchar, "%s/images/mouse.bmp", launchDir); sprintf(tmpchar, "%s/images/mouse.bmp", launchDir);
tmp = SDL_LoadBMP(tmpchar); tmp = SDL_LoadBMP(tmpchar);
if (tmp) { if (tmp) {
inputMode[1] = SDL_DisplayFormat(tmp); inputMode[1] = SDL_DisplayFormat(tmp);
SDL_FreeSurface(tmp); SDL_FreeSurface(tmp);
} }
return 0; return 0;
} }
void inputmode_redraw (void) { void inputmode_redraw (void) {
SDL_Rect r; SDL_Rect r;
SDL_Surface* surface; SDL_Surface* surface;
r.x = 80; r.x = 80;
r.y = 60; r.y = 60;
r.w = 160; r.w = 160;
r.h = 120; r.h = 120;
if (inputMode[0] && inputMode[1]) { if (inputMode[0] && inputMode[1]) {
// if (gp2xMouseEmuOn) { // if (gp2xMouseEmuOn) {
if (1) { if (1) {
surface = inputMode[1]; surface = inputMode[1];
} else { } else {
surface = inputMode[0]; surface = inputMode[0];
} }
SDL_BlitSurface(surface, NULL, prSDLScreen, &r); SDL_BlitSurface(surface, NULL, prSDLScreen, &r);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment