mirror of
https://github.com/RetroDECK/RetroQUEST.git
synced 2025-04-21 01:24:06 +00:00
Checkpoint: now the core can be loaded with errors (but getting there!)
This commit is contained in:
parent
0fff64f084
commit
9dffd94f24
|
@ -53,9 +53,12 @@ void RetroHost::forwarded_input( const godot::Ref<godot::InputEvent> &event )
|
|||
if(retro_key > RETROK_LAST)
|
||||
return;
|
||||
|
||||
this->core.retro_keyboard_event_callback( key_event->is_pressed(), retro_key,
|
||||
0, modifiers );
|
||||
|
||||
if (this->core.retro_keyboard_event_callback) {
|
||||
this->core.retro_keyboard_event_callback(key_event->is_pressed(), retro_key, 0, modifiers);
|
||||
} else {
|
||||
godot::UtilityFunctions::printerr("[RetroHost] retro_keyboard_event_callback is not set.");
|
||||
}
|
||||
|
||||
keyboard_state[retro_key] = key_event->is_pressed();
|
||||
}
|
||||
}
|
|
@ -141,6 +141,7 @@ bool RetroHost::load_core(godot::String name)
|
|||
load_symbol_return_false_on_err(this->core.handle, this->core.retro_run, retro_run);
|
||||
load_symbol_return_false_on_err(this->core.handle, this->core.retro_load_game, retro_load_game);
|
||||
load_symbol_return_false_on_err(this->core.handle, this->core.retro_unload_game, retro_unload_game);
|
||||
load_symbol_return_false_on_err(this->core.handle, this->core.retro_keyboard_event_callback, retro_keyboard_event_callback);
|
||||
|
||||
godot::UtilityFunctions::print("[RetroHost] All symbols loaded successfully.");
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ private:
|
|||
bool (*retro_load_game)(const struct retro_game_info *game);
|
||||
void (*retro_unload_game)(void);
|
||||
|
||||
retro_keyboard_event_t retro_keyboard_event_callback;
|
||||
retro_keyboard_event_t retro_keyboard_event_callback = nullptr;
|
||||
} core;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue