wince fixes
This commit is contained in:
parent
578ceb104e
commit
524c1e8813
|
@ -1,3 +1,6 @@
|
|||
#ifdef _WIN32_WCE
|
||||
#include "wince.h"
|
||||
#endif
|
||||
#include <lua.h>
|
||||
#include <lauxlib.h>
|
||||
#include <lualib.h>
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
#include "externals.h"
|
||||
#include "internals.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h>
|
||||
#include <SDL_ttf.h>
|
||||
|
@ -9,6 +6,9 @@
|
|||
#include "SDL_gfxBlitFunc.h"
|
||||
#include "SDL_anigif.h"
|
||||
|
||||
#include "externals.h"
|
||||
#include "internals.h"
|
||||
|
||||
#define Surf(p) ((SDL_Surface *)p)
|
||||
|
||||
static SDL_Surface *screen = NULL;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include <SDL.h>
|
||||
|
||||
#include "externals.h"
|
||||
#include "internals.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
static int m_focus = 0;
|
||||
static int m_minimized = 0;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "externals.h"
|
||||
#include "internals.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_mixer.h>
|
||||
|
||||
#include "externals.h"
|
||||
#include "internals.h"
|
||||
|
||||
int audio_rate = 22050;
|
||||
Uint16 audio_format = MIX_DEFAULT_FORMAT;
|
||||
int audio_channels = 2;
|
||||
|
|
|
@ -28,7 +28,7 @@ char *game_locale(void)
|
|||
{
|
||||
char buff[64];
|
||||
buff[0] = 0;
|
||||
if (!GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME,
|
||||
if (!GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME,
|
||||
buff,sizeof(buff) - 1))
|
||||
return NULL;
|
||||
return strdup(buff);
|
||||
|
@ -42,7 +42,7 @@ static char *game_cp(void)
|
|||
char cpbuff[64];
|
||||
char buff[64];
|
||||
buff[0] = 0;
|
||||
if (!GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE,
|
||||
if (!GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE,
|
||||
buff,sizeof(buff) - 1))
|
||||
return NULL;
|
||||
snprintf(cpbuff, sizeof(cpbuff), "WINDOWS-%s", buff);
|
||||
|
@ -154,21 +154,10 @@ char *home_dir( void )
|
|||
char *app_dir( void )
|
||||
{
|
||||
static char appdir[PATH_MAX]="";
|
||||
#ifdef _LOCAL_APPDATA
|
||||
strcpy(appdir, game_cwd);
|
||||
strcat(appdir, "/appdata");
|
||||
if (!access(appdir, W_OK))
|
||||
return appdir;
|
||||
#endif
|
||||
|
||||
SHGetFolderPath( NULL,
|
||||
CSIDL_FLAG_CREATE | CSIDL_LOCAL_APPDATA,
|
||||
NULL,
|
||||
0,
|
||||
(LPTSTR)appdir );
|
||||
unix_path(appdir);
|
||||
strcat(appdir, "/instead");
|
||||
return appdir;
|
||||
}
|
||||
|
||||
char *game_cfg_path( void )
|
||||
|
|
9
src/sdl-instead/wince.h
Normal file
9
src/sdl-instead/wince.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef _WINCE_EXTERNAL_H
|
||||
#define _WINCE_EXTERNAL_H
|
||||
|
||||
#define errno 0
|
||||
#define strerror(a) ""
|
||||
#define putenv(a) ;
|
||||
#define setlocale(a, b) ;
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue