ref: 516fc276f112baf0bd4508596598aed49929bde9
parent: 78bf67af9a8d7da4f70eddba499d257856ba6364
author: LTCHIPS <ltchips994@gmail.com>
date: Wed Jul 25 11:09:55 EDT 2018
mouse is now toggleable (more specifically, if mouse is disabled in game, the mouse will be freed from the game, useful if you're debugging)
--- a/src/rt_main.c
+++ b/src/rt_main.c
@@ -319,8 +319,15 @@
if (standalone==true)
ServerLoop();
+
+
VL_SetVGAPlaneMode();
VL_SetPalette(origpal);
+
+ if (mouseenabled)
+ {
+ SDL_SetRelativeMouseMode(SDL_TRUE);
+ }
// SetTextMode();
// GraphicsMode();
--- a/src/rt_menu.c
+++ b/src/rt_menu.c
@@ -3728,11 +3728,19 @@
if (MousePresent)
{
mouseenabled^=1;
+ if (mouseenabled)
+ SDL_SetRelativeMouseMode(SDL_TRUE);
+ else
+ SDL_SetRelativeMouseMode(SDL_FALSE);
+
DrawCtlButtons ();
CusItems.curpos=-1;
}
else
+ {
mouseenabled = 0;
+ SDL_SetRelativeMouseMode(SDL_FALSE);
+ }
break;
case JOYENABLE: