there was already code for this, but it was broken due to:
- the message is WM_SYSCOMMAND and wParam is SC_SCREENSAVE etc.
- GSPanel doesn't get WM_SYSCOMMAND - GSFrame does.
- also disabled screen saver while paused if not set to hide the GS window.
- it's an ugly hack where windows keeps trying to activate the screen saver
every few seconds but such code prevents it (Lilypad has the same hack).
the new code uses windows API which was designed for this.
the screen saver is now disabled while the window is focused and the emulation
is running. it's on by defauly and without GUI - the same as with normal games.
this patch addresses Windows only, but adds a placeholder for future
implementations for other platforms.
Performance is not important here. I'm not sure Windows could handle VLA
* new/delete can still be used otherwise.
* Put an assert(0) because debugger surely don't use string bigger than
128 bytes.
code is much more compact 20 lines vs 700 lines ...
Call to vsnprintf update the gp_offset of the varargs (at least on x86_64 linux).
Therefore the 2nd call (because buffer was too small) uses out-of-memory arguments
We need to keep a local copy otherwise you will get an awful SIGSEV
Note: I'm sure we have same issue on plugins
After a Console.Write/Writeln that uses colors a call to
ConsoleColorScope::LeaveScope() is made to restore m_old_color. This
restoration command stays buffered until a full line is printed. In the
meantime any console message that happens will use the old coloring
and if the program happens to crash the console would keep using the
color of the last colored text that was printed.
builds an Utilies_NO_TLS.a archive of the common Utilities code. It replaces native TLS by a slower reimplementation
Rational: number of TLS slot is very limited by the GLIBc on linux. I hope it doesn't impact performance.
* Zzogl don't requires TLS AFAIK
* spu2x will likely use it for assertions only.
TLS exhaustion creates issue to dlopen plugins
issue #384 : https://github.com/PCSX2/pcsx2/issues/384
But also for profiled build (-fprofile-generate)
http://forums.pcsx2.net/Thread-WORKAROUND-build-with-fprofile-generate
If someone have a better idea, please raise your hand!
Possibly also changes the semantics. According to the docs, it should now be
equal to the Windows code (up to accuracy issues, of course).
v2: done by gregory38
Fix miscalculation of time. Unit must be in 1s/GetThreadTicksPerSeconds(). (now us)
Factorize a bit GetCpuTime/GetThreadCpuTime
Note: results seems reasonables and mostly equivalent as before.
* link common with c lib (required for gold linker)
* fix the macro to properly set the library variable
=> use the variable instead to hardcoded value
The non-stdint fallback was not even working which shows that it was never used. No supported platform would not have stdint anyway.
Remove unused code and do not restrict types to Linux and MSVC. Was there a reason for this?
* Manually cast WxGetTranslation
* Accept string as format parameter of pxWindowTextWriter
* Manually convert wxString to wide string
Note: Wx setup.h is not the same between Debian and Arch. Unfortunately it
generated various compilations errors on wx code.
Close issue #172