Skip to content

Commit 9c2ad80

Browse files
dkosmariDaniel K. O. (dkosmari)
andauthored
Wii U: Removed SDL_WiiUSetSWKBDEnabled() (#123)
* Removed SDL_WiiUSetSWKBDEnabled(), use SDL_HINT_ENABLE_SCREEN_KEYBOARD instead. * Added trailing spaces and tabs back. --------- Co-authored-by: Daniel K. O. (dkosmari) <none@none>
1 parent 76c16a1 commit 9c2ad80

2 files changed

Lines changed: 0 additions & 38 deletions

File tree

include/SDL_system.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -623,16 +623,6 @@ typedef enum SDL_WiiUSysWMEventType {
623623
SDL_WIIU_SYSWM_SWKBD_CANCEL_EVENT
624624
} SDL_WiiUSysWMEventType;
625625

626-
/**
627-
* Disable the swkbd.
628-
*
629-
* Use this function if you only want text input from a physical USB keyboard.
630-
*
631-
* \param enabled `SDL_FALSE` if you do not want the swkbd to show up after calling
632-
* `SDL_StartTextInput()`.
633-
*/
634-
extern DECLSPEC void SDLCALL SDL_WiiUSetSWKBDEnabled(SDL_bool enabled);
635-
636626
/**
637627
* Select the swkbd keyboard mode.
638628
*

src/video/wiiu/SDL_wiiuswkbd.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ namespace
194194

195195
} // namespace appear
196196

197-
bool enabled = true;
198-
199197
raw_string swkbdLocale;
200198

201199
nn::swkbd::ControllerInfo controllerInfo;
@@ -506,9 +504,6 @@ void WIIU_SWKBD_Initialize(void)
506504
if (detail::create::created)
507505
return;
508506

509-
if (!detail::enabled)
510-
return;
511-
512507
if (!detail::fsLib)
513508
detail::fsLib.emplace();
514509

@@ -574,9 +569,6 @@ void WIIU_SWKBD_Calc(void)
574569
if (!detail::create::created)
575570
return;
576571

577-
if (!detail::enabled)
578-
return;
579-
580572
nn::swkbd::Calc(detail::controllerInfo);
581573
detail::controllerInfo = {};
582574

@@ -630,9 +622,6 @@ void WIIU_SWKBD_Draw(SDL_Window *window)
630622
if (window != detail::appear::window)
631623
return;
632624

633-
if (!detail::enabled)
634-
return;
635-
636625
nn::swkbd::State state = nn::swkbd::GetStateInputForm();
637626
if (state == nn::swkbd::State::Hidden)
638627
return;
@@ -645,16 +634,11 @@ void WIIU_SWKBD_Draw(SDL_Window *window)
645634

646635
SDL_bool WIIU_SWKBD_HasScreenKeyboardSupport(_THIS)
647636
{
648-
if (!detail::enabled)
649-
return SDL_FALSE;
650637
return SDL_TRUE;
651638
}
652639

653640
void WIIU_SWKBD_ShowScreenKeyboard(_THIS, SDL_Window *window)
654641
{
655-
if (!detail::enabled)
656-
return;
657-
658642
WIIU_SWKBD_Initialize();
659643

660644
if (!detail::appear::window)
@@ -738,18 +722,6 @@ SDL_bool WIIU_SWKBD_IsScreenKeyboardShown(_THIS, SDL_Window *window)
738722
return SDL_FALSE;
739723
}
740724

741-
void SDL_WiiUSetSWKBDEnabled(SDL_bool enabled)
742-
{
743-
if (detail::enabled != !!enabled) {
744-
detail::enabled = enabled;
745-
if (!detail::enabled) {
746-
// If application is turning swkbd off, we better free up all memory too.
747-
WIIU_SWKBD_Finalize();
748-
detail::create::cleanup();
749-
}
750-
}
751-
}
752-
753725
void SDL_WiiUSetSWKBDKeyboardMode(SDL_WiiUSWKBDKeyboardMode mode)
754726
{
755727
switch (mode) {

0 commit comments

Comments
 (0)