riscos: Ensure that last_mouse_buttons is initialised correctly
diff --git a/src/video/riscos/SDL_riscosevents.c b/src/video/riscos/SDL_riscosevents.c
index b0a0d75..56fe398 100644
--- a/src/video/riscos/SDL_riscosevents.c
+++ b/src/video/riscos/SDL_riscosevents.c
@@ -143,6 +143,7 @@ int
RISCOS_InitEvents(_THIS)
{
SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
+ _kernel_swi_regs regs;
int i, status;
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_SCROLL, (status & (1 << 1)) != 0);
+ _kernel_swi(OS_Mouse, ®s, ®s);
+ driverdata->last_mouse_buttons = regs.r[2];
+
/* Disable escape. */
_kernel_osbyte(229, 1, 0);