Ouchface
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Mouse in SDL Ports (Choco, EE, Odamex, PRBoom)
Pages (2): « 1 [2]  
Author
All times are GMT. The time now is 02:20. Post New Thread    Post A Reply
entryway
Forum Staple


Posts: 2587
Registered: 01-04



Grader said:
So you are saying that when WINDIB is used there's no way around to "free" the cursor?

It's possible to make it differently. PrBoom uses that method and that's because its behavior is different.

prboom.bat
SET SDL_VIDEODRIVER=windib
prboom.exe


But if you do not use this (current) technique:

SDL_GetRelativeMouseState(&x, &y);
D_PostEvent(ev_mouse, x, y);
SDL_WarpMouse(centerx, centery);

then mouse movements will be awful. PrBoom still has it. After I discovered why SDL mouse movement is so laggy in some situations (more correctly: I discovered how to fix, not why it happens) I recoded it in current way and most (all?) SDL-based ports have stolen that. You can find few topics about that here.

Current behaviour is much better, because mouse movement is smoother.

Last edited by entryway on 06-15-10 at 14:50

Old Post 06-15-10 14:45 #
entryway is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
entryway
Forum Staple


Posts: 2587
Registered: 01-04



Grader said:
So you are saying that when WINDIB is used there's no way around to "free" the cursor?


http://prboom-plus.sourceforge.net/...test2-win32.zip


sdl_videodriver "default" // default means windib for WinXP
mouse_accumulate_motion 1 // this variable will be created after first run


Do you still have the issue?

glboom-plus -geom 120x200w works at least much better

Last edited by entryway on 06-15-10 at 21:54

Old Post 06-15-10 21:33 #
entryway is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Grader
Warming Up


Posts: 10
Registered: 06-10



entryway said:


http://prboom-plus.sourceforge.net/...test2-win32.zip



Do you still have the issue?

glboom-plus -geom 120x200w works at least much better


Yep. It's still has it.
But I guest it's fine, since you always can set 1280x1024 and/or lower mouse resolution...
And maybe add this to FAQ...

Old Post 06-16-10 06:20 #
Grader is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Grader
Warming Up


Posts: 10
Registered: 06-10



Grader said:

Yep. It's still has it.
But I guest it's fine, since you always can set 1280x1024 and/or lower mouse resolution...
And maybe add this to FAQ...


My bad :(
Misunderstood you. mouse_accumulate_motion is added and set to 0 by default.
Setting it to 1 DID help!
You did it, man, thanks! :)

Last edited by Grader on 06-16-10 at 07:01

Old Post 06-16-10 06:43 #
Grader is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Grader
Warming Up


Posts: 10
Registered: 06-10


My guess is - you changed the code so that calling SDL_GetRelativeMouseState(&x, &y) and centering the mouse is done more often and results are accumulated untill next calling of D_PostEvent(&ev), right?

Old Post 06-16-10 07:00 #
Grader is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
entryway
Forum Staple


Posts: 2587
Registered: 01-04



Grader said:
My guess is - you changed the code so that calling SDL_GetRelativeMouseState(&x, &y) and centering the mouse is done more often and results are accumulated untill next calling of D_PostEvent(&ev), right?

Yes. I do it each frame in case of uncapped framerate and instead of sleep(ms_to_next_tick) in case of capped framerate

http://pastebin.org/335903

Old Post 06-16-10 07:59 #
entryway is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 02:20. Post New Thread    Post A Reply
Pages (2): « 1 [2]  
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Mouse in SDL Ports (Choco, EE, Odamex, PRBoom)

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory