mirror of
https://github.com/libretro/RetroArch
synced 2025-04-03 10:21:31 +00:00
libnx: use stock clock for swkbd
This commit is contained in:
parent
5c09cf29a4
commit
ea027c0b55
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_LIBNX
|
#ifdef HAVE_LIBNX
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
|
#include "../../switch_performance_profiles.h"
|
||||||
#include "menu_osk.h"
|
#include "menu_osk.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -92,6 +93,7 @@ unsigned menu_input_dialog_get_kb_idx(void)
|
|||||||
#ifdef HAVE_LIBNX
|
#ifdef HAVE_LIBNX
|
||||||
#define LIBNX_SWKBD_LIMIT 500 /* enforced by HOS */
|
#define LIBNX_SWKBD_LIMIT 500 /* enforced by HOS */
|
||||||
extern u32 __nx_applet_type;
|
extern u32 __nx_applet_type;
|
||||||
|
extern void libnx_apply_overclock();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool menu_input_dialog_get_display_kb(void)
|
bool menu_input_dialog_get_display_kb(void)
|
||||||
@ -106,6 +108,8 @@ bool menu_input_dialog_get_display_kb(void)
|
|||||||
|
|
||||||
SwkbdConfig kbd;
|
SwkbdConfig kbd;
|
||||||
|
|
||||||
|
pcvSetClockRate(PcvModule_Cpu, SWITCH_CPU_SPEEDS_VALUES[SWITCH_DEFAULT_CPU_PROFILE]);
|
||||||
|
|
||||||
Result rc = swkbdCreate(&kbd, 0);
|
Result rc = swkbdCreate(&kbd, 0);
|
||||||
|
|
||||||
if (R_SUCCEEDED(rc))
|
if (R_SUCCEEDED(rc))
|
||||||
@ -145,10 +149,14 @@ bool menu_input_dialog_get_display_kb(void)
|
|||||||
if (menu_input_dialog_keyboard_display)
|
if (menu_input_dialog_keyboard_display)
|
||||||
input_keyboard_event(true, '\n', '\n', 0, RETRO_DEVICE_KEYBOARD);
|
input_keyboard_event(true, '\n', '\n', 0, RETRO_DEVICE_KEYBOARD);
|
||||||
|
|
||||||
|
libnx_apply_overclock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
libnx_apply_overclock();
|
||||||
return menu_input_dialog_keyboard_display;
|
return menu_input_dialog_keyboard_display;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return menu_input_dialog_keyboard_display;
|
return menu_input_dialog_keyboard_display;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user