mirror of https://github.com/encounter/SDL.git
riscos: Ensure that last_mouse_buttons is initialised correctly
This commit is contained in:
parent
cb43eb43f8
commit
347659e8cf
|
@ -143,6 +143,7 @@ int
|
||||||
RISCOS_InitEvents(_THIS)
|
RISCOS_InitEvents(_THIS)
|
||||||
{
|
{
|
||||||
SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
|
SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
|
||||||
|
_kernel_swi_regs regs;
|
||||||
int i, status;
|
int i, status;
|
||||||
|
|
||||||
for (i = 0; i < RISCOS_MAX_KEYS_PRESSED; i++)
|
for (i = 0; i < RISCOS_MAX_KEYS_PRESSED; i++)
|
||||||
|
@ -153,6 +154,9 @@ RISCOS_InitEvents(_THIS)
|
||||||
SDL_ToggleModState(KMOD_CAPS, (status & (1 << 4)) == 0);
|
SDL_ToggleModState(KMOD_CAPS, (status & (1 << 4)) == 0);
|
||||||
SDL_ToggleModState(KMOD_SCROLL, (status & (1 << 1)) != 0);
|
SDL_ToggleModState(KMOD_SCROLL, (status & (1 << 1)) != 0);
|
||||||
|
|
||||||
|
_kernel_swi(OS_Mouse, ®s, ®s);
|
||||||
|
driverdata->last_mouse_buttons = regs.r[2];
|
||||||
|
|
||||||
/* Disable escape. */
|
/* Disable escape. */
|
||||||
_kernel_osbyte(229, 1, 0);
|
_kernel_osbyte(229, 1, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue