2025-07-20 16:01 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004254Spring engineGeneralpublic2014-01-07 16:14
Reporterabma 
Assigned TojK 
PrioritynormalSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
Product Version96.0.1+git 
Target Version97.0Fixed in Version 
Summary0004254: [SDL2] (win32 only) mouse clicks are ignored
Descriptionbut mousewheel works! (but it is to way fast)
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • txt file icon infolog.txt (5,670 bytes) 2014-01-07 09:26 -
    [ParseCmdLine] command-line args: "D:\temp\spring\spring.exe"
    Using configuration source: "D:\temp\spring\springsettings.cfg"
    Using additional configuration source: "D:\Users\abma\Local\springsettings.cfg"
    Using additional configuration source: "C:\Users\abma\Documents\My Games\Spring\springsettings.cfg"
    Available log sections: KeyBindings, AutohostInterface, Net, CSMFGroundTextures, RoamMeshDrawer, BumpWater, DynWater, SkyBox, DecalsDrawerGL4, FarTextureHandler, Model, Piece, ModelDrawer, OBJParser, WorldObjectModelRenderer, Shader, Texture, Font, GroundMoveType, Path, UnitScript, CregSerializer, ArchiveScanner, VFS, Sound, LuaSocket
    Enabled log sections: Sound(LOG_LEVEL_INFO)
    Enable or disable log sections using the LogSections configuration key
      or the SPRING_LOG_SECTIONS environment variable (both comma separated).
      Use "none" to disable the default log sections.
    LogOutput initialized.
    Spring 96.0.1-116-g79ffa8a develop
    Build date/time: Jan  7 2014 02:19:46
    Build environment: boost-105300, GNU libstdc++ version 20130531
    Compiler: gcc-4.8.1
    OS: Microsoft Windows
    Microsoft Windows 7 Business Edition, 64-bit Service Pack 1 (build 7601)
    AMD Phenom(tm) II X4 945 Processor; 4061MB RAM, 4059MB pagefile
    OS: emulated 32bit mode
    [CMyMath::Init] CPU SSE mask: 888, flags:
    	SSE 1.0:  1,  SSE 2.0:  1
    	SSE 3.0:  1, SSSE 3.0:  0
    	SSE 4.1:  0,  SSE 4.2:  0
    	SSE 4.0A: 1,  SSE 5.0A: 0
    	using streflop SSE FP-math mode, CPU supports SSE instructions
    Supported Video modes: 640x480, 640x480, 640x480, 640x480, 640x480, 640x480, 640x480, 640x480, 640x480, 640x480, 720x480, 720x480, 720x480, 720x480, 720x480, 720x480, 720x480, 720x480, 720x576, 720x576, 720x576, 720x576, 720x576, 720x576, 720x576, 720x576, 800x600, 800x600, 800x600, 800x600, 800x600, 800x600, 800x600, 800x600, 1024x768, 1024x768, 1024x768, 1024x768, 1024x768, 1024x768, 1152x864, 1152x864, 1152x864, 1152x864, 1280x720, 1280x720, 1280x720, 1280x720, 1280x768, 1280x768, 1280x800, 1280x800, 1280x960, 1280x960, 1280x1024, 1280x1024, 1280x1024, 1280x1024, 1360x768, 1360x768, 1360x1024, 1360x1024, 1366x768, 1366x768, 1400x1050, 1400x1050, 1440x900, 1440x900, 1600x900, 1600x900, 1600x1200, 1600x1200, 1680x1050, 1680x1050
    SDL version:  linked 2.0.1; compiled 2.0.1
    GL version:   4.2.11733 Compatibility Profile Context
    GL vendor:    ATI Technologies Inc.
    GL renderer:  ATI Radeon HD 5700 Series
    GLSL version: 4.20
    GLEW version: 1.5.8
    Video RAM:    total 762MB, available 987MB
    GL info:
    	haveARB: 1, haveGLSL: 1, ATI hacks: 1
    	FBO support: 1, NPOT-texture support: 1, 24bit Z-buffer support: 0
    	maximum texture size: 16384, compress MIP-map textures: 0
    	maximum SmoothPointSize: 63, maximum vec4 varying/attributes: 32/29
    	maximum drawbuffers: 8, maximum recommended indices/vertices: 16777215/2147483647
    	number of UniformBufferBindings: 75 (64kB)
    [InitOpenGL] video mode set to 0x0:24bit @60Hz 
    Using VSync
    [WatchDogInstall] Installed (HangTimeout: 10sec)
    [ThreadPool::SetThreadCount][1] #wanted=4 #current=1
    [ThreadPool::SetThreadCount][2] #threads=3
    [DataDirs] Portable Mode!
    Using read-write data directory: D:\temp\spring\
    Using read-only data directory: C:\Users\abma\Documents\My Games\Spring\
    Scanning: C:\Users\abma\Documents\My Games\Spring\maps
    Scanning: C:\Users\abma\Documents\My Games\Spring\games
    Scanning: C:\Users\abma\Documents\My Games\Spring\packages
    Scanning: D:\temp\spring\base
    [f=0000000] Joysticks found: 0
    [f=0000000] Warning: Joystick 0 not found
    [f=0000000] [ThreadPool::SetThreadCount][1] #wanted=3 #current=4
    [f=0000000] [ThreadPool::SetThreadCount][2] #threads=2
    [f=0000000] [Threading] Main thread CPU affinity not set
    [f=0000000] [Initialize] CPU Clock: win32::TimeGetTime
    [f=0000000] [Initialize] CPU Cores: 4
    [f=0000000] [Sound] OpenAL info:
    [f=0000000] [Sound]   Available Devices:
    [f=0000000] [Sound]               DirectSound Software
    [f=0000000] [Sound]   Device:     DirectSound Software
    [f=0000000] [Sound]   Vendor:         OpenAL Community
    [f=0000000] [Sound]   Version:        1.1 ALSOFT 1.11.753
    [f=0000000] [Sound]   Renderer:       OpenAL Soft
    [f=0000000] [Sound]   AL Extensions:  AL_EXTX_buffer_sub_data AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_OFFSET AL_EXTX_sample_buffer_object AL_EXT_source_distance_model AL_LOKI_quadriphonic
    [f=0000000] [Sound]   ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_disconnect ALC_EXT_EFX ALC_EXTX_thread_local_context
    [f=0000000] [Sound]   EFX Enabled: yes
    [f=0000000] [Sound]   Max Sounds: 128
    [f=0000000] [ArchiveScanner] Warning: No game selected checksum: not found (0)
    [f=0000000] [ArchiveScanner] Warning: No map selected checksum: not found (0)
    [f=0000000] [InitOpenGL] video mode set to 640x480:24bit @60Hz 
    [f=0000000] User exited
    [f=0000000] [SpringApp::ShutDown][1]
    [f=0000000] [ThreadPool::SetThreadCount][1] #wanted=0 #current=3
    [f=0000000] [ThreadPool::SetThreadCount][2] #threads=0
    [f=0000000] [SpringApp::ShutDown][2]
    [f=0000000] [SpringApp::ShutDown][3]
    [f=0000000] [SpringApp::ShutDown][4]
    [f=0000000] [SpringApp::ShutDown][5]
    [f=0000000] [Sound] [~CSound][1] soundThread=07F65C70
    [f=0000000] [Sound] [~CSound][2]
    [f=0000000] [Sound] [~CSound][3]
    [f=0000000] [SpringApp::ShutDown][6]
    [f=0000000] [SpringApp::ShutDown][7]
    [f=0000000] [SpringApp::ShutDown][8]
    [f=0000000] [SpringApp::ShutDown][9]
    [SpringApp::ShutDown][10]
    [SpringApp::ShutDown][11]
    [WatchDog::Uninstall][1] hangDetectorThread=02EEF620
    [WatchDog::Uninstall][2]
    [WatchDog::Uninstall][3]
    [SpringApp::ShutDown][12]
    [SpringApp::Run] exitCode=0
    
    txt file icon infolog.txt (5,670 bytes) 2014-01-07 09:26 +

-Relationships
+Relationships

-Notes

~0012609

cleanrock (reporter)

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

~0012616

jK (developer)

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

~0012636

abma (administrator)

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

~0012637

msafwan (reporter)

Last edited: 2014-01-07 11:01

View 3 revisions

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.

~0012638

abma (administrator)

@msafwan:

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

this ticket is about mouse not working.

~0012640

abma (administrator)

Last edited: 2014-01-07 12:20

View 5 revisions

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

~0012641

jK (developer)

?

~0012642

abma (administrator)

Last edited: 2014-01-07 12:41

View 5 revisions

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)

~0012643

jK (developer)

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

~0012644

abma (administrator)

SDL_pool() doesn't exist.

~0012645

jK (developer)

typo?

~0012646

abma (administrator)

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.

~0012647

abma (administrator)

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.

~0012649

abma (administrator)

works for me! great, thanks!

only issue i found is 0004260
+Notes

-Issue History
Date Modified Username Field Change
2014-01-05 14:09 abma New Issue
2014-01-05 14:10 abma Description Updated View Revisions
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 View Revisions
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 View Revisions
2014-01-07 11:01 msafwan Note Edited: 0012637 View Revisions
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 View Revisions
2014-01-07 12:19 abma Note Edited: 0012640 View Revisions
2014-01-07 12:19 abma Note Edited: 0012640 View Revisions
2014-01-07 12:20 abma Note Edited: 0012640 View Revisions
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 View Revisions
2014-01-07 12:29 abma Note Edited: 0012642 View Revisions
2014-01-07 12:30 abma Note Edited: 0012642 View Revisions
2014-01-07 12:35 jK Note Added: 0012643
2014-01-07 12:41 abma Note Edited: 0012642 View Revisions
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
+Issue History