Remove idle func
This commit is contained in:
34
src/input.cc
34
src/input.cc
@@ -45,11 +45,6 @@ static void screenshotBlitter(unsigned char* src, int src_pitch, int a3, int x,
|
||||
static void buildNormalizedQwertyKeys();
|
||||
static void _GNW95_process_key(KeyboardData* data);
|
||||
|
||||
static void idleImpl();
|
||||
|
||||
// 0x51E234
|
||||
static IdleFunc* _idle_func = nullptr;
|
||||
|
||||
// 0x51E23C
|
||||
static int gKeyboardKeyRepeatRate = 80;
|
||||
|
||||
@@ -149,10 +144,6 @@ int inputInit(int a1)
|
||||
gTickerListHead = nullptr;
|
||||
gScreenshotKeyCode = KEY_ALT_C;
|
||||
|
||||
// SFALL: Set idle function.
|
||||
// CE: Prevents frying CPU when window is not focused.
|
||||
inputSetIdleFunc(idleImpl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -696,22 +687,6 @@ int inputGetKeyboardKeyRepeatDelay()
|
||||
return gKeyboardKeyRepeatDelay;
|
||||
}
|
||||
|
||||
// NOTE: Unused.
|
||||
//
|
||||
// 0x4C9448
|
||||
void inputSetIdleFunc(IdleFunc* func)
|
||||
{
|
||||
_idle_func = func;
|
||||
}
|
||||
|
||||
// NOTE: Unused.
|
||||
//
|
||||
// 0x4C9450
|
||||
IdleFunc* inputGetIdleFunc()
|
||||
{
|
||||
return _idle_func;
|
||||
}
|
||||
|
||||
// 0x4C9490
|
||||
static void buildNormalizedQwertyKeys()
|
||||
{
|
||||
@@ -1171,17 +1146,10 @@ void _GNW95_lost_focus()
|
||||
while (!gProgramIsActive) {
|
||||
_GNW95_process_message();
|
||||
|
||||
if (_idle_func != nullptr) {
|
||||
_idle_func();
|
||||
}
|
||||
SDL_Delay(125);
|
||||
}
|
||||
}
|
||||
|
||||
static void idleImpl()
|
||||
{
|
||||
SDL_Delay(125);
|
||||
}
|
||||
|
||||
void beginTextInput()
|
||||
{
|
||||
SDL_StartTextInput();
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
namespace fallout {
|
||||
|
||||
typedef void(IdleFunc)();
|
||||
typedef void(TickerProc)();
|
||||
|
||||
typedef int(PauseHandler)();
|
||||
@@ -35,8 +34,6 @@ void inputSetKeyboardKeyRepeatRate(int value);
|
||||
int inputGetKeyboardKeyRepeatRate();
|
||||
void inputSetKeyboardKeyRepeatDelay(int value);
|
||||
int inputGetKeyboardKeyRepeatDelay();
|
||||
void inputSetIdleFunc(IdleFunc* func);
|
||||
IdleFunc* inputGetIdleFunc();
|
||||
int _GNW95_input_init();
|
||||
void _GNW95_process_message();
|
||||
void _GNW95_clear_time_stamps();
|
||||
|
||||
Reference in New Issue
Block a user