Commit Graph

20 Commits

Author SHA1 Message Date
Nathan Fulton
71dd4eb5b5 Save preferences as json
Preferences have keys as defined in ht.h. These keys can be used to read/write preferences. Preferences are saved in a .json on the disk.
This is much easier to work with than the old presences binary structures as it doesn’t require preference versioning.
2017-10-21 20:36:37 -04:00
Nathan Fulton
2ef0ab5ae8 Implement host file I/O
Host file I/O API to read files from disk
2017-10-21 20:28:31 -04:00
Nathan Fulton
31ca038021 Fix bug with simulation pause state and backgrounding 2017-10-21 02:54:14 -04:00
Nathan Fulton
b06b3db1d4 Process SDL_KEYUP for SDLK_AC_BACK
This prevents SDLK_AC_BACK from getting processed multiple times if an
Android user holds their finger on the hardware back button.
2017-10-21 02:54:09 -04:00
Nathan Fulton
1226f3ec50 Implement SDL HostGetCurrentKeyState() 2017-10-21 02:49:38 -04:00
Nathan Fulton
8de4b24252 Remove SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH
OTG mouse events don’t get processed correctly. With this hint removed,
SDL mouse events will be handled as touch events and touch will raise
fake mouse events.
2017-10-21 02:49:37 -04:00
Nathan Fulton
c488c6222a Set pevt->ff when sdl host processes messages 2016-08-31 23:54:49 -04:00
Nathan Fulton
bec7aea014 Initial SDL-Linux port 2016-08-31 23:54:48 -04:00
Nathan Fulton
fc00f91f25 Added processing for vchrBack
Android’s system back button will be processed as vchrBack which will
select kidcCancel on most forms. This causes the user to feel that the
game is more integrated with the OS.
2016-08-31 23:54:48 -04:00
Nathan Fulton
d6b301c3e7 Track client platform version
Client platform version can be retrieved live with /ids and is also
recorded in the playerdetail module.
2016-08-31 23:54:48 -04:00
Nathan Fulton
4f2a0de55c SDL display improvements 2016-08-31 22:43:36 -04:00
Nathan Fulton
31adbf1da0 Save reinitialize game on SDL-iOS when app is terminated 2016-08-31 22:43:35 -04:00
Nathan Fulton
27f07f70f9 Improve backgrounding on SDL-iOS and SDL-Android
If the client is connected to multiplayer when the app is backgrounded,
that connection will be closed. If the app is reopened, a message will
be presented with the user informing them of the disconnection. Single
player games will be paused when entering background and resumed when
entering foreground.
2016-08-31 22:43:34 -04:00
Nathan Fulton
19d74d3da6 SDL host timestamp events when processed if necessary 2016-08-24 21:34:45 -04:00
Nathan Fulton
94e319e1ee Implement multitouch for SDL 2016-08-24 21:34:34 -04:00
Nathan Fulton
d926ef0bbe Prevent SDL from rendering when app is backgrounded
On some platforms, the game will crash if SDL attempts to render to the
screen/window while the game is backgrounded. To prevent this, stop
rendering when the game enters a background state and resume rendering
when the game enters a foreground state.
2016-08-24 16:20:31 -04:00
Nathan Fulton
8f0e81a3f5 Create main thread via host
Create the main thread via host rather than being a global variable in
base; this way, no base threads are created before the host runs main()
because that can cause issues on some platforms.
2016-08-24 16:20:31 -04:00
Nathan Fulton
b9f189beb9 Fix NullEvent and TransportEvent processing bug in SDL port
- Fix kidmNullEvent / base::kidmNullEvent issue
- Fix kidmTransportEvent / base::kidmTransportEvent issue
2016-08-24 16:20:09 -04:00
Nathan Fulton
deff3ab3f9 SDL host HostGetDeviceId() -> HostGenerateDeviceId() 2016-08-24 15:40:31 -04:00
Darrin Massena
f4c0203914 initial commit 2014-07-06 17:47:28 -07:00