SDL: account for rounded screen corners for text input

This commit is contained in:
Sergii Pylypenko
2018-12-13 20:49:08 +02:00
parent 63178dd22b
commit da55d86723
3 changed files with 4 additions and 4 deletions

View File

@@ -871,6 +871,8 @@ public class MainActivity extends Activity
screenKeyboard.setTextColor(this.getResources().getColor(android.R.color.background_light));
if( isRunningOnOUYA() && Globals.TvBorders )
screenKeyboard.setPadding(100, 100, 100, 100); // Bad bad HDMI TVs all have cropped borders
else
screenKeyboard.setPadding(20, 20, 20, 20); // Account for rounded screen corners
_screenKeyboard = screenKeyboard;
_videoLayout.addView(_screenKeyboard);
//_screenKeyboard.setKeyListener(new TextKeyListener(TextKeyListener.Capitalize.NONE, false));

View File

@@ -715,7 +715,7 @@ int main(int argc, char* argv[])
if(evt.key.keysym.sym == SDLK_2)
{
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "Async text input started");
asyncTextInputBuf[0] = 0;
strcpy(asyncTextInputBuf, "async");
SDL_ANDROID_GetScreenKeyboardTextInputAsync(asyncTextInputBuf, sizeof(asyncTextInputBuf));
}
if(evt.key.keysym.sym == SDLK_3)
@@ -768,7 +768,7 @@ int main(int argc, char* argv[])
}
}
}
if( screenKeyboardShown != SDL_IsScreenKeyboardShown(NULL))
if( screenKeyboardShown != SDL_IsScreenKeyboardShown(NULL) )
{
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "Screen keyboard shown: %d -> %d", screenKeyboardShown, SDL_IsScreenKeyboardShown(NULL));
screenKeyboardShown = SDL_IsScreenKeyboardShown(NULL);

View File

@@ -27,8 +27,6 @@ TODO, which will get actually done
- SDL: SdlVideoResizeKeepAspect=y mouse location shifted near right border.
- SDL: Text input window is slightly out of screen on phone with virtual navigation keys.
- SDL: Text input window still blocks touches sometimes after text input is finished.
- Debian: proot crashes on Shield TV arm64 box.