Commit Graph

52 Commits

Author SHA1 Message Date
Aaron Culliney
397b43b3e7 Improve joystick button reset procedure 2019-11-10 16:10:08 -08:00
Aaron Culliney
00984b7ab9 Compile on Android with more warnings 2019-10-27 13:10:29 -07:00
Aaron Culliney
f038ef0346 Unify and brace thread creation with TEMP_FAILURE_RETRY() 2019-02-24 09:24:12 -08:00
Aaron Culliney
db4a71ca6f Enable Chromium systrace for all platforms 2018-11-24 15:15:34 -08:00
Aaron Culliney
2a7e375f26 Minor refactor joystick prefs 2018-11-04 14:06:38 -08:00
Aaron Culliney
e4e0c941d3 Refactor CPU assembly for simplicity and efficiency
- Variables needed in assembly now accessible in a struct pointer that  avoids __PIC__ nastiness
    - Reduces code size and execution time for CPU thread
2018-01-15 16:19:21 -08:00
Aaron Culliney
53459c9e78 Clean up a number of Xcode build warnings 2017-09-28 16:27:12 -07:00
Aaron Culliney
70e203303e HACK : fix a test suite breakage caused by joystick button reset delay 2016-05-02 22:14:42 -07:00
Aaron Culliney
7607126f7c Avoid resetting joystick buttons too soon (to allow for ClosedApple-Reset to trigger) 2016-04-17 12:51:23 -07:00
Aaron Culliney
3ed159dd0b Lightly refactor joystick and button handling during reset
- Remove unused button2 variable
    - Remake little-used backend joystick reset function as function pointer
    - Allow soft reset and self-test on Android (although there is still a race condition due to code that directly sets
      joy_button[12] values
2016-04-17 11:42:13 -07:00
Aaron Culliney
db816ad502 Refactor Android variant to use common shared JSON preferences
- Eliminates a whole bunch of boilerplate setter/getter code in various places
    - Accesses preferences directly from JSON data through custom json_parse.h API
    - Improves code locality for Java menus/settings
2016-04-11 22:01:30 -07:00
Aaron Culliney
74a5b74ae3 Refactor prefs into JSON publish/subscribe API
- Breaking changes currently only tested on Linux desktop build =P
    - Goal is to eventually eliminate most/many of the disparate getter/setter functions to allow better
      modularity/scaling and platform portability
2016-03-26 13:44:13 -07:00
Aaron Culliney
c2014e2cde Add simple display of touch joystick azimuth 2016-01-03 12:36:13 -08:00
Aaron Culliney
d69b416c58 Lightly refactor emulator joystick API in preparation for more comprehensive refactor 2015-12-19 13:01:28 -08:00
Aaron Culliney
2cc23cf35d Upgrade to GPLv3 "or later" and update copyrights 2015-10-22 21:09:13 -07:00
Aaron Culliney
2c97f7af19 Excise HEADLESS ... it was only being used by testcpu 2015-09-06 17:14:38 -07:00
Aaron Culliney
5df1e2400e Add ability to hide joystick controls overlay 2015-08-22 11:05:18 -07:00
Aaron Culliney
d2b526783a Improve joystick calibration modes and keypad menus 2015-08-21 20:34:19 -07:00
Aaron Culliney
5c3791f5dc Refactor GL Touch Joystick (PART I Native changes)
- Move touch-handling code for "regular" touch joystick into separate file
    - Add new touch-handling code for "keypad" touch joystick.  This is a somewhat complex state-machine to determine
      which key to press depending on a full keypad rosette.
    - Adds a callback to vm.c to hook into keyboard read callback.  Allows us to immediately queue the next key if the
      keypad touch joystick is long-pressed for either axis or button keys.
2015-08-18 21:59:41 -07:00
Aaron Culliney
7344cadfbd More joystick settings including calibration mode 2015-08-02 14:29:34 -07:00
Aaron Culliney
324d900c35 First cut at Android touch joystick configuration 2015-08-01 17:33:29 -07:00
Aaron Culliney
abfa6e743b Bugfix : properly show icon for joystick or keyboard 2015-07-29 21:18:25 -07:00
Aaron Culliney
1126a319ec Misc tweaks to various GL interface objects 2015-04-26 18:12:56 -07:00
Aaron Culliney
ca139ee94a REFACTOR : glanimation rechristend, touch handling genericized
- 'animation' was too constrained a name to what these do, so switch to the overloaded term 'node' ;-)
    - Touch handling is no longer the sole purview of the touchjoy, (in prep for touchable HUD elements)
2015-04-12 15:55:06 -07:00
Aaron Culliney
30236cb400 First cut at GL Touch Joystick 2015-04-01 19:59:38 -07:00
Aaron Culliney
1c31c1074d REFACTOR : macro defines into toggles 2015-02-16 08:47:26 -08:00
Aaron Culliney
a24436e88f Gamepad clamp-beyond-radius implemented 2014-12-05 22:31:12 -08:00
Aaron Culliney
bc643bfbdb joystick devices only supported under VIDEO_OPENGL 2014-11-25 21:59:05 -08:00
Aaron Culliney
c075460b76 Gets OpenGL output working with testing VM and display
* Refactors test routine to its own thread to not interfere with OpenGL on main thread
    * Misc TESTING/HEADLESS switch tweaks
2014-11-22 14:24:43 -08:00
Aaron Culliney
e5e087c4e0 Refactor joystick handling
* Removes Linux-specific joystick handling
    * Adds cross-platform GLUT joystick handling; Caveats:
        - GLUT is not robust to joystick hot plugging like my old Linux-specific code was.  (Fix should be made in the
          GLUT driver and pushed upstream if we really care)
        - Deprecated X11 renderer now can only use keypad joystick
2014-11-09 15:48:05 -08:00
Aaron Culliney
0eeb93820c Fix Open-Apple (joy button 0) stuck after reboot 2014-10-25 12:51:09 -07:00
Aaron Culliney
c140c5c7e0 Mini-refactor 2014-10-19 12:54:03 -07:00
Aaron Culliney
a929ef854c Refactor video_sync() and friends
- main thread render loop goes into X11 video driver
    - removes video_sync()
2014-09-16 20:38:14 -07:00
Aaron Culliney
1649419b39 Fixe unused variable warnings 2014-06-14 11:50:50 -07:00
Aaron Culliney
c22fbd0374 Reduce dependence on global TEMP buffer
* display.S still uses this ... will be refactored completely with new video update
2014-05-11 19:18:53 -07:00
Aaron Culliney
1c3fc78838 refactor game controller switches to C 2014-05-10 13:08:44 -07:00
Aaron Culliney
e57f332ff6 moar ifdefs for various macro conditional codepaths
* INTERFACE_CLASSIC : specifies the "classic" (current) menuing system
    * AUDIO_ENABLED : specifies whether audio code is enabled
2014-03-23 14:25:28 -07:00
asc
3abd2e87aa Refactor to use GNU build tools
* Added configure.ac and non-recursive Makefile.am
    * Modularized source into subdirectories
    * Simplified header inclusion
2014-01-22 20:51:50 -08:00
Aaron Culliney
4ada3d7319 More sanity with scancodes and keycodes
* Use defines instead of magic numbers in a bunch of places
    * Remove deprecated ii_keymaps and only use iie_keymaps
    * Allow keypad corners for emulated joystick
2013-12-29 18:07:24 -08:00
Aaron Culliney
d2215b0f0b Better calibration extremes 2013-12-29 11:40:19 -08:00
Aaron Culliney
760a409762 Remove apparently unused/unneeded js_timelimit 2013-12-29 10:58:43 -08:00
Aaron Culliney
ffd78508ba Better support for keypad emulated joystick
* Allow for automatic recentering of keypad emulated joystick
    * Force X11 to give us a detectable auto-repeat
2013-12-28 21:48:42 -08:00
Aaron Culliney
f8d338b382 Automatically save preference on quit 2013-12-28 14:28:04 -08:00
Aaron Culliney
bca9f24ebe Update preferences for joystick modes
* Preferences file changes to support a fixed joystick
    * Simplify the interface -- remove explicitly setting joy_step
2013-12-28 13:54:26 -08:00
Aaron Culliney
b9815968a1 Various fixes for input handling
* Merges input handling into one routine called thru video_sync at refresh rate
    * Adds keypad joystick calibration routine
    * Simplify joystick calibration routines to use same codepath as main emulator joystick handling
2013-12-28 13:08:35 -08:00
Aaron Culliney
ef59e1ae9a Better PC Joystick calibration routine
* Cleaned up the parameters page
    * Tweaked main/credits page
2013-12-21 23:56:21 -08:00
Aaron Culliney
34a5fea9a7 Remove unneeded joystick parameters & preferences 2013-12-21 15:25:02 -08:00
Aaron Culliney
3340997798 WIP : fix joystick parameters 2013-12-08 16:57:02 -08:00
Aaron Culliney
71d5367875 Preferences changes
* Deprecate "lazy" color modes
    * Allow setting speaker sound volume
    * Make Joystick code more generic (future support of touch input)
    * Deprecate setting emulator mode (//e is ascendant)
2013-12-06 22:55:00 -08:00
Aaron Culliney
e52b25f170 get joystick working again after a decade 2013-11-25 16:58:55 -08:00