Commit Graph

7 Commits

Author SHA1 Message Date
Tamás Bálint Misius
0fb36012a2
Clean up window creation somewhat
Fixes most of the rat's nest situation mentioned in 8cfe7cdd93.
2023-10-05 19:47:29 +02:00
Tamás Bálint Misius
8cfe7cdd93
Clean up window frame settings somewhat
Another rat's nest; I'm still not entirely satisfied.

This introduces "frame personalities": one for embedded frames (emscripten), one for handheld devices and everything else that doesn't really work with windows (android), and one for everything else. For now these affect which frame options are configurable by the user and what values they are forced to take if they are not configurable, and whether optimal scale is guessed based on screen size.

Also introduce a future TouchUI config node to allow switching between normal and touch-optimized UI on android. Again, because chromebooks and other android devices with mouse and keyboard support are a thing.

Also enable debugging of debug builds of android. It took me hours to attach a stupid debugger to the process; see:

 - https://www.sh-zam.com/2019/05/debugging-krita-on-android.html
 - https://source.android.com/docs/core/tests/debug/gdb#app-startup

I also had to adb forward the port that lldb was supposedly talking to lldb-server over because otherwise it wouldn't attach; I don't get it either.
2023-10-04 16:01:00 +02:00
Tamás Bálint Misius
bfe7d765c4
Emscripten: Disable hopefully all ways to quit
Also fix FPS going nuts when recreating the window by setting it again every time.
2023-08-22 00:26:33 +02:00
Tamás Bálint Misius
c725894abd
Emscripten: Add "vsync" FPS limit mode
Would be really useful for native versions too, but it's more complicated to pull off. For now, vsync on native is the same as tpt.setfpscap(2).
2023-08-22 00:26:32 +02:00
Tamás Bálint Misius
9f71eb9d77
Emscripten: Add compatible main loop 2023-08-22 00:26:32 +02:00
Tamás Bálint Misius
694bc8eb0f
Fix exit behaviour
We can't rely on atexit, handlers registered with it are in a hard to establish ordering relationship with destructors of static and thread-local objects.
2023-01-27 14:55:58 +01:00
Tamás Bálint Misius
11945ba620
Factor out game stuff from PowderToySDL.cpp 2023-01-27 09:29:19 +01:00