Fixed (SDL2) Mouse does not stay centered in Windowed Mode (SRB2 v2.1.12)

Status
Not open for further replies.

EternallyAries

That Aries Title
On both Software and OpenGL windowed mode, mouse does not stay centered on the screen. If I move it quickly vertical or horizontal it moves outside the screen causing the game to pause if I click anything.

Both SRB2 executive been tested.

This only happen in srb2win.exe.

Does not seem to effect srb2dd.exe.
 
Last edited by a moderator:

EternallyAries

That Aries Title
The mouse doesn't recenter itself at all? Are you running srb2 with any flags?

The mouse does recenter itself by moving it back within the window. It only passes outside the windowed border when I move the mouse fast enough.

Only seems to happen in srb2win.exe and not in srb2dd.exe.

This is what my two batch files executes.

Code:
srb2win.exe -win

srb2win.exe -win -opengl

I've tried it in compatibility mode along with administrator as well if it worth mentioning.

And just in case, here is my configuration file.

SRB2 configuration file.
cpuaffinity "1"
surround "Off"
precachesound "Off"
stereoreverse "Off"
gr_md2 "Off"
gr_coronasize "1"
gr_coronas "On"
gr_dynamiclighting "On"
gr_staticlighting "On"
gr_softwarefog "Off"
gr_fogcolor "AAAAAA"
gr_voodoocompatibility "Off"
gr_fog "On"
gr_fovchange "Off"
gr_gammared "127"
gr_gammagreen "127"
gr_gammablue "127"
maxportals "2"
translucenthud "10"
skybox "On"
offsetshadows "Off"
shadow "Off"
drawdist_precip "Infinite"
drawdist_nights "Infinite"
drawdist "Infinite"
precipdensity "V.Thick"
flipcam "No"
homremoval "No"
translucency "On"
scr_height "768"
scr_width "1024"
scr_depth "16 bits"
fullscreen "No"
cd_update "1"
cd_volume "31"
snd_channels "32"
midimusicvolume "17"
digmusicvolume "17"
soundvolume "17"
useranalog2 "Off"
useranalog "Off"
use_joystick2 "0"
use_joystick "0"
mousemove2 "On"
mousemove "On"
mousesens2 "10"
mousesens "31"
invertmouse2 "Off"
invertmouse "Off"
use_mouse2 "Off"
use_mouse "On"
controlperkey "One"
mouse2port "COM2"
joyaxis2_firenormal "None"
joyaxis_firenormal "None"
joyaxis2_fire "None"
joyaxis_fire "None"
joyaxis2_look "None"
joyaxis_look "None"
joyaxis2_move "Y-Axis"
joyaxis_move "Y-Axis"
joyaxis2_turn "X-Axis"
joyaxis_turn "X-Axis"
joyaxis2_side "Z-Axis"
joyaxis_side "Z-Axis"
alwaysmlook2 "Off"
alwaysmlook "On"
crosshair2 "Cross"
crosshair "Cross"
gamma "0"
resetmusic "No"
ghost_guest "Hide"
ghost_last "Hide"
ghost_bestrings "Hide"
ghost_besttime "Hide"
ghost_bestscore "Hide"
timerres "Normal"
rollingdemos "On"
seenames "Off"
name2 "Tails"
name "Aries"
splats "On"
gif_downscale "On"
gif_optimize "Off"
apng_speed "1/2x"
apng_window_size "32k"
apng_strategy "RLE"
apng_memory_level "(Max Memory) 9"
apng_compress_level "4"
png_window_size "32k"
png_strategy "Normal"
png_memory_level "7"
png_compress_level "(Optimal) 6"
moviemode_mode "GIF"
screenshot_folder "SRB2_Pics"
screenshot_option "CUSTOM"
maxping "0"
cpusleep "-1"
skipmapcheck "Off"
nettimeout "525"
maxsend "3000"
maxplayers "32"
servername "SRB2 Server"
masterserver "ms.srb2.org:28900"
con_backcolor "Red"
con_backpic "translucent"
con_height "50"
con_speed "8"
con_hudlines "5"
con_hudtime "5"
con_textsize "Medium"
stretch "On"
vid_wait "Off"
setcontrol "forward" "w"
setcontrol "backward" "s"
setcontrol "strafeleft" "a"
setcontrol "straferight" "d"
setcontrol "turnleft" "KEY0"
setcontrol "turnright" "KEY0"
setcontrol "weaponnext" "Wheel 1 UP"
setcontrol "weaponprev" "Wheel 1 Down"
setcontrol "weapon1" "KEY0"
setcontrol "weapon2" "KEY0"
setcontrol "weapon3" "KEY0"
setcontrol "weapon4" "KEY0"
setcontrol "weapon5" "KEY0"
setcontrol "weapon6" "KEY0"
setcontrol "weapon7" "KEY0"
setcontrol "weapon8" "8"
setcontrol "weapon9" "9"
setcontrol "weapon10" "0"
setcontrol "fire" "MOUSE1"
setcontrol "firenormal" "SPACE"
setcontrol "tossflag" "e"
setcontrol "use" "q"
setcontrol "camtoggle" "v"
setcontrol "camleft" "KEY0"
setcontrol "camright" "KEY0"
setcontrol "camreset" "KEY0"
setcontrol "lookup" "KEY0"
setcontrol "lookdown" "KEY0"
setcontrol "centerview" "MOUSE3"
setcontrol "mouseaiming" "KEY0"
setcontrol "talkkey" "t"
setcontrol "teamtalkkey" "y"
setcontrol "scores" "TAB"
setcontrol "jump" "MOUSE2"
setcontrol "console" "TILDE"
setcontrol "pause" "HOME"
setcontrol "custom1" "KEY0"
setcontrol "custom2" "KEY0"
setcontrol "custom3" "KEY0"
setcontrol2 "forward" "UP ARROW"
setcontrol2 "backward" "DOWN ARROW"
setcontrol2 "strafeleft" "KEY0"
setcontrol2 "straferight" "KEY0"
setcontrol2 "turnleft" "LEFT ARROW"
setcontrol2 "turnright" "RIGHT ARROW"
setcontrol2 "weaponnext" "KEY0"
setcontrol2 "weaponprev" "KEY0"
setcontrol2 "weapon1" "KEY0"
setcontrol2 "weapon2" "KEY0"
setcontrol2 "weapon3" "KEY0"
setcontrol2 "weapon4" "KEY0"
setcontrol2 "weapon5" "KEY0"
setcontrol2 "weapon6" "KEY0"
setcontrol2 "weapon7" "KEY0"
setcontrol2 "weapon8" "KEY0"
setcontrol2 "weapon9" "KEY0"
setcontrol2 "weapon10" "KEY0"
setcontrol2 "fire" "KEY0"
setcontrol2 "firenormal" "KEY0"
setcontrol2 "tossflag" "KEY0"
setcontrol2 "use" "RCTRL"
setcontrol2 "camtoggle" "KEY0"
setcontrol2 "camleft" "KEY0"
setcontrol2 "camright" "KEY0"
setcontrol2 "camreset" "KEY0"
setcontrol2 "lookup" "KEY0"
setcontrol2 "lookdown" "KEY0"
setcontrol2 "centerview" "KEY0"
setcontrol2 "mouseaiming" "KEY0"
setcontrol2 "talkkey" "KEY0"
setcontrol2 "teamtalkkey" "KEY0"
setcontrol2 "scores" "KEY0"
setcontrol2 "jump" "/"
setcontrol2 "console" "KEY0"
setcontrol2 "pause" "KEY0"
setcontrol2 "custom1" "KEY0"
setcontrol2 "custom2" "KEY0"
setcontrol2 "custom3" "KEY0"
 
Last edited:

AlamGBC

WOO! GO ME! YAHOO!
Administrator
Sonic Team Junior
SDL_SetRelativeMouseMode

yea, that why I had SDL_SetRelativeMouseMode so the mouse could not move out of the window when we grab the mouse cursor, we need to restore the code to do this:
Code:
SDL_SetRelativeMouseMode(SDL_TRUE)

and have if the function does not return -1, we need to switch the mouse input code to handle xrel/yrel of the mouse events
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Top