No need to pass shifted out

This commit is contained in:
simon.kagstrom 2009-01-23 18:19:10 +00:00
parent 1e3e2778ab
commit 4799e2e91b
3 changed files with 6 additions and 7 deletions

View File

@ -302,12 +302,9 @@ void C64::bind_keys(Prefs *np)
int key;
bool shifted;
if (this->virtual_keyboard->get_key(&key, &shifted) != false)
if (this->virtual_keyboard->get_key(&key) != false)
{
this->prefs_changed = true;
if (shifted)
key |= 0x80;
np->JoystickKeyBinding[opt] = key;
}
}

View File

@ -159,7 +159,7 @@ const char *VirtualKeyboard::keycode_to_string(int kc)
return out;
}
bool VirtualKeyboard::get_key(int *kc, bool *shifted)
bool VirtualKeyboard::get_key(int *kc)
{
bool out = false;
@ -190,7 +190,9 @@ bool VirtualKeyboard::get_key(int *kc, bool *shifted)
out = true;
*kc = key.kc;
*shifted = this->shift_on;
if (this->shift_on)
*kc |= 0x80;
if (key.is_shift == true)
this->toggle_shift();
else

View File

@ -16,7 +16,7 @@ class VirtualKeyboard
{
public:
VirtualKeyboard(SDL_Surface *screen, TTF_Font *font);
bool get_key(int *kc, bool *shifted);
bool get_key(int *kc);
const char *keycode_to_string(int kc);
private: