View Issue Details

IDProjectCategoryView StatusLast Update
0004254Spring engineGeneralpublic2014-01-07 16:14
Reporterabma Assigned TojK  
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product Version96.0.1+git 
Target Version97.0 
Summary0004254: [SDL2] (win32 only) mouse clicks are ignored
Descriptionbut mousewheel works! (but it is to way fast)
TagsNo tags attached.
Attached Files
infolog.txt (Attachment missing)
Checked infolog.txt for Errors

Activities

cleanrock

2014-01-05 14:26

reporter   ~0012609

Perhaps related to the win hacks in MouseInput.cpp, hopefully we don't need those hacks with SDL2.

jK

2014-01-05 15:39

developer   ~0012616

We need, in theory we need them for x11 too btw.

They are needed cause SDL only supports pooled input events -> it only checks keyboard & mouse events when SDL_pool() is called, any events between those are dropped!
This is already very bad at 20fps cause many user given input is just ignored then.

-> I FUCKING HATE SDL

abma

2014-01-07 09:27

administrator   ~0012636

doesn't work in Spring 96.0.1-116-g79ffa8a develop

msafwan

2014-01-07 11:00

reporter   ~0012637

Last edited: 2014-01-07 11:01

I got this error after starting Spring 96.0.1-116-g79ffa8a in Windows from lobby (also can't click anything)

[f=0000000] Error: OpenGL: source<API> type<error> id<2332> severity<high>:glLineWidth parameter <width> has an invalid value '0.000000': must be greater than 0.000000 (GL_INVALID_VALUE)

This error is spammed indefinitely.

abma

2014-01-07 11:54

administrator   ~0012638

@msafwan:

wrong ticket! please report your gl issues to http://springrts.com/mantis/view.php?id=4247

this ticket is about mouse not working.

abma

2014-01-07 12:18

administrator   ~0012640

Last edited: 2014-01-07 12:20

example doesn't look like it'll drop events:
http://wiki.libsdl.org/SDL_PollEvent#Code_Examples

did you try it with sdl2 on windows? (means removing CWin32MouseInput)

https://github.com/spring/spring/blob/develop/rts/System/Input/MouseInput.cpp#L261

jK

2014-01-07 12:24

developer   ~0012641

?

abma

2014-01-07 12:28

administrator   ~0012642

Last edited: 2014-01-07 12:41

did you try to remove the hacks in MouseInput.cpp? i'm also a bit confused about pool vs poll. (its SDL_PollEvent() i guess)

jK

2014-01-07 12:35

developer   ~0012643

1. I already said why the code is in there
2. "pool vs poll" ????

abma

2014-01-07 12:41

administrator   ~0012644

SDL_pool() doesn't exist.

jK

2014-01-07 12:44

developer   ~0012645

typo?

abma

2014-01-07 12:46

administrator   ~0012646

idk, this is why i ask you what you mean. (was written 2 times, so i assumed no typo)

example code clearly shows that this is how it should be used:

while (1) {
    SDL_Event event;
    while (SDL_PollEvent(&event)) {
         // handle your event here
    }
    // do some other stuff here -- draw your app, etc.
}


this doesn't look like "it only checks keyboard & mouse events when SDL_pool() is called, any events between those are dropped!"

because of that, i ask you, if you did test if SDL_PollEvent works on windows without dropping events. as our current implemention doesn't work, i guess you didn't.

abma

2014-01-07 12:56

administrator   ~0012647

is our implementation wrong?

http://stackoverflow.com/questions/20620458/sdl-event-queue
http://stackoverflow.com/questions/20620780/sdl-mouse-events-are-not-being-handled-quick-enough/

didn't find anything about "dropped" events related to SDL.

abma

2014-01-07 16:14

administrator   ~0012649

works for me! great, thanks!

only issue i found is 0004260

Issue History

Date Modified Username Field Change
2014-01-05 14:09 abma New Issue
2014-01-05 14:10 abma Description Updated
2014-01-05 14:13 abma Product Version => 96.0.1+git
2014-01-05 14:26 cleanrock Note Added: 0012609
2014-01-05 15:39 jK Note Added: 0012616
2014-01-07 00:53 abma Severity major => block
2014-01-07 00:53 abma Summary [SDL2] (win32 only) mouse click not possible in fullscreen mode => [SDL2] (win32 only) mouse clicks are ignored
2014-01-07 00:53 abma Description Updated
2014-01-07 01:34 jK Changeset attached => spring develop 33a51943
2014-01-07 01:34 jK Assigned To => jK
2014-01-07 01:34 jK Status new => resolved
2014-01-07 01:34 jK Resolution open => fixed
2014-01-07 09:26 abma File Added: infolog.txt
2014-01-07 09:27 abma Note Added: 0012636
2014-01-07 09:27 abma Assigned To jK =>
2014-01-07 09:27 abma Status resolved => new
2014-01-07 11:00 msafwan Note Added: 0012637
2014-01-07 11:01 msafwan Note Edited: 0012637
2014-01-07 11:01 msafwan Note Edited: 0012637
2014-01-07 11:54 abma Note Added: 0012638
2014-01-07 12:18 abma Note Added: 0012640
2014-01-07 12:18 abma Note Edited: 0012640
2014-01-07 12:19 abma Note Edited: 0012640
2014-01-07 12:19 abma Note Edited: 0012640
2014-01-07 12:20 abma Note Edited: 0012640
2014-01-07 12:24 jK Note Added: 0012641
2014-01-07 12:28 abma Note Added: 0012642
2014-01-07 12:29 abma Note Edited: 0012642
2014-01-07 12:29 abma Note Edited: 0012642
2014-01-07 12:30 abma Note Edited: 0012642
2014-01-07 12:35 jK Note Added: 0012643
2014-01-07 12:41 abma Note Edited: 0012642
2014-01-07 12:41 abma Note Added: 0012644
2014-01-07 12:44 jK Note Added: 0012645
2014-01-07 12:46 abma Note Added: 0012646
2014-01-07 12:56 abma Note Added: 0012647
2014-01-07 14:38 jK Changeset attached => spring develop a8f009aa
2014-01-07 14:38 jK Assigned To => jK
2014-01-07 14:38 jK Status new => resolved
2014-01-07 14:38 jK Status resolved => feedback
2014-01-07 14:38 jK Resolution fixed => reopened
2014-01-07 16:14 abma Note Added: 0012649
2014-01-07 16:14 abma Status feedback => assigned
2014-01-07 16:14 abma Status assigned => resolved
2014-01-07 16:14 abma Resolution reopened => fixed