Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions include/SDL_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -623,16 +623,6 @@ typedef enum SDL_WiiUSysWMEventType {
SDL_WIIU_SYSWM_SWKBD_CANCEL_EVENT
} SDL_WiiUSysWMEventType;

/**
* Disable the swkbd.
*
* Use this function if you only want text input from a physical USB keyboard.
*
* \param enabled `SDL_FALSE` if you do not want the swkbd to show up after calling
* `SDL_StartTextInput()`.
*/
extern DECLSPEC void SDLCALL SDL_WiiUSetSWKBDEnabled(SDL_bool enabled);

/**
* Select the swkbd keyboard mode.
*
Expand Down
28 changes: 0 additions & 28 deletions src/video/wiiu/SDL_wiiuswkbd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ namespace

} // namespace appear

bool enabled = true;

raw_string swkbdLocale;

nn::swkbd::ControllerInfo controllerInfo;
Expand Down Expand Up @@ -506,9 +504,6 @@ void WIIU_SWKBD_Initialize(void)
if (detail::create::created)
return;

if (!detail::enabled)
return;

if (!detail::fsLib)
detail::fsLib.emplace();

Expand Down Expand Up @@ -574,9 +569,6 @@ void WIIU_SWKBD_Calc(void)
if (!detail::create::created)
return;

if (!detail::enabled)
return;

nn::swkbd::Calc(detail::controllerInfo);
detail::controllerInfo = {};

Expand Down Expand Up @@ -630,9 +622,6 @@ void WIIU_SWKBD_Draw(SDL_Window *window)
if (window != detail::appear::window)
return;

if (!detail::enabled)
return;

nn::swkbd::State state = nn::swkbd::GetStateInputForm();
if (state == nn::swkbd::State::Hidden)
return;
Expand All @@ -645,16 +634,11 @@ void WIIU_SWKBD_Draw(SDL_Window *window)

SDL_bool WIIU_SWKBD_HasScreenKeyboardSupport(_THIS)
{
if (!detail::enabled)
return SDL_FALSE;
return SDL_TRUE;
}

void WIIU_SWKBD_ShowScreenKeyboard(_THIS, SDL_Window *window)
{
if (!detail::enabled)
return;

WIIU_SWKBD_Initialize();

if (!detail::appear::window)
Expand Down Expand Up @@ -738,18 +722,6 @@ SDL_bool WIIU_SWKBD_IsScreenKeyboardShown(_THIS, SDL_Window *window)
return SDL_FALSE;
}

void SDL_WiiUSetSWKBDEnabled(SDL_bool enabled)
{
if (detail::enabled != !!enabled) {
detail::enabled = enabled;
if (!detail::enabled) {
// If application is turning swkbd off, we better free up all memory too.
WIIU_SWKBD_Finalize();
detail::create::cleanup();
}
}
}

void SDL_WiiUSetSWKBDKeyboardMode(SDL_WiiUSWKBDKeyboardMode mode)
{
switch (mode) {
Expand Down