Use SDL_IsTextInputActive for Input::getTextInputMode

This commit is contained in:
Inori 2019-09-07 02:33:42 -04:00
parent 6b9328d294
commit 7e419cbe95
2 changed files with 5 additions and 7 deletions

View file

@ -1,8 +1,9 @@
# mkxp-z
[![forthebadge](https://forthebadge.com/images/badges/built-with-resentment.svg)](https://forthebadge.com)
![Made for dark types](https://img.shields.io/badge/made_for-dark_types-71584a?style=for-the-badge)
![GitHub commits since latest release](https://img.shields.io/github/commits-since/inori-z/mkxp-z/latest?style=for-the-badge)
![built with resentment](https://img.shields.io/badge/built_with-resentment-d55c32?style=for-the-badge)
![Made for dark types](https://img.shields.io/badge/made_for-dark_types-71584a?style=for-the-badge)
![ss](/screenshot.png?raw=true)

View file

@ -27,6 +27,7 @@
#include "util.h"
#include <SDL_scancode.h>
#include <SDL_keyboard.h>
#include <SDL_mouse.h>
#include <SDL_clipboard.h>
@ -458,8 +459,6 @@ struct InputPrivate
int rawRepeating;
unsigned int repeatCount;
unsigned int rawRepeatCount;
bool textInputMode;
struct
{
@ -499,8 +498,6 @@ struct InputPrivate
dir4Data.previous = Input::None;
dir8Data.active = 0;
textInputMode = false;
}
inline ButtonState &getStateCheck(int code)
@ -964,7 +961,7 @@ int Input::mouseY()
bool Input::getTextInputMode()
{
return p->textInputMode;
return (SDL_IsTextInputActive() == SDL_TRUE);
}
void Input::setTextInputMode(bool mode)