Commit Graph

10 Commits

Author SHA1 Message Date
cutealien
a3adfc196b CIrrDeviceWin32::yield() now uses Sleep(0) instead of Sleep(1).
We had changed that once before in the other direction in svn r421
Reason back then was "Sleep(0) doesn't allow any lower priority threads to execute"
But Microsoft changed the behaviour of Sleep(0) after Windows XP so that's no longer true.
And the costs of it is pretty high - due to this using a timer with a 15ms resolutions it meant not just giving up the thread but it also always waited for 15ms on Windows.
I also replaced a few sleep calls in examples for that reason with yield() calls.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6459 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-04-03 15:32:41 +00:00
cutealien
817d59f379 Prevent potential 0 pointer access when release not acquired joystick.
Found by clang analyser. Not sure if it could really ever have happened, but won't hurt to fix

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6443 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-11-19 16:41:11 +00:00
cutealien
ca4bbcb71f Fix compiling on MinGW (broke in [r6394])
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6397 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-14 15:10:22 +00:00
cutealien
3eee408cac Avoid potential call to GetProcAddress with 0 for HMODULE
Found by VS code analyser

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6394 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-13 15:03:27 +00:00
cutealien
1dbab53e5a Prefer static_cast to reinterpret_cast where possible.
Just safer. Could probably do in a lot more places... another time.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6293 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-08 18:22:20 +00:00
cutealien
c83eaa654c SIrrlichtCreationParameters::WindowResizable no longer bool but has 3 states.
New default is that the system decides itself.
Reason is that X11 didn't like the last change (disabling it on start) too much and we got messed up title-bars.
Or at least on some Window Managers. Which makes sense as X11 really requires Windows to be resizable in Windowed mode.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6196 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-03-06 15:49:43 +00:00
cutealien
f478272392 No longer try to set WM_QUIT when using an external Window on Win32.
Thx @Marko Mahnič for the patch (https://sourceforge.net/p/irrlicht/bugs/449)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6135 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-08-11 19:17:24 +00:00
cutealien
0b92a66c50 Replace list of hwnd -> IrrlichtDevice mapper with an array.
Single inserts/removes per device creating/destruction, but searchs on every event. Arrays are better for that than lists.
Also document a bit.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6004 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-12 17:31:22 +00:00
cutealien
6ad09a3a25 Remove unused function getEnvMapperFromHWnd
I suspect we could also get rid of the EnvMap list, not sure what that is about.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6003 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-12 17:16:51 +00:00
cutealien
8310a3fbad Avoid warning and make local variable lower-case.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6000 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-12 16:32:41 +00:00