mirror of
https://github.com/TomHarte/CLK.git
synced 2024-08-26 21:29:27 +00:00
Makes extra sure not to try to read from an empty characters list.
This commit is contained in:
parent
33ea90678c
commit
3c51e335c3
@ -395,7 +395,7 @@ struct ActivityObserver: public Activity::Observer {
|
|||||||
case VK_ANSI_D: joysticks[0]->set_input(Inputs::Joystick::Input(Inputs::Joystick::Input::Fire, 2), is_pressed); break;
|
case VK_ANSI_D: joysticks[0]->set_input(Inputs::Joystick::Input(Inputs::Joystick::Input::Fire, 2), is_pressed); break;
|
||||||
case VK_ANSI_F: joysticks[0]->set_input(Inputs::Joystick::Input(Inputs::Joystick::Input::Fire, 3), is_pressed); break;
|
case VK_ANSI_F: joysticks[0]->set_input(Inputs::Joystick::Input(Inputs::Joystick::Input::Fire, 3), is_pressed); break;
|
||||||
default:
|
default:
|
||||||
if(characters) {
|
if(characters.length) {
|
||||||
joysticks[0]->set_input(Inputs::Joystick::Input([characters characterAtIndex:0]), is_pressed);
|
joysticks[0]->set_input(Inputs::Joystick::Input([characters characterAtIndex:0]), is_pressed);
|
||||||
} else {
|
} else {
|
||||||
joysticks[0]->set_input(Inputs::Joystick::Input::Fire, is_pressed);
|
joysticks[0]->set_input(Inputs::Joystick::Input::Fire, is_pressed);
|
||||||
|
Loading…
Reference in New Issue
Block a user