Some improvements on Teeworlds port - it still crashes for no reason when I'm pressing 5-th button
This commit is contained in:
@@ -67,6 +67,8 @@ extern DECLSPEC int SDLCALL SDL_ANDROID_GetScreenKeyboardAutoFireButtonsAmount()
|
||||
extern DECLSPEC int SDLCALL SDL_ANDROID_SetScreenKeyboardShown(int shown);
|
||||
extern DECLSPEC int SDLCALL SDL_ANDROID_GetScreenKeyboardShown();
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_ANDROID_GetScreenKeyboardSize();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -60,7 +60,8 @@ int SDL_ANDROID_isTouchscreenKeyboardUsed = 0;
|
||||
static int touchscreenKeyboardTheme = 0;
|
||||
static int touchscreenKeyboardShown = 1;
|
||||
static int AutoFireButtonsNum = 0;
|
||||
static int nbuttons;
|
||||
static int nbuttons = 4;
|
||||
static int buttonsize = 1;
|
||||
|
||||
static SDL_Rect arrows, buttons[MAX_BUTTONS];
|
||||
static SDLKey buttonKeysyms[MAX_BUTTONS] = {
|
||||
@@ -551,6 +552,7 @@ JAVA_EXPORT_NAME(Settings_nativeSetupScreenKeyboard) ( JNIEnv* env, jobject thi
|
||||
if( AutoFireButtonsNum > MAX_BUTTONS_AUTOFIRE )
|
||||
AutoFireButtonsNum = MAX_BUTTONS_AUTOFIRE;
|
||||
// TODO: works for horizontal screen orientation only!
|
||||
buttonsize = size;
|
||||
|
||||
if(touchscreenKeyboardTheme == 0)
|
||||
{
|
||||
@@ -785,3 +787,8 @@ int SDL_ANDROID_GetScreenKeyboardShown()
|
||||
{
|
||||
return touchscreenKeyboardShown;
|
||||
};
|
||||
|
||||
int SDL_ANDROID_GetScreenKeyboardSize()
|
||||
{
|
||||
return buttonsize;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user