49 Commits

Author SHA1 Message Date
Nikolai Wuttke 4da8667187 Implement support for multiple controllers, and hot-plugging 2021-02-05 13:27:05 +01:00
Nikolai Wuttke 42f08ae6ce Build our own copy of ImGui SDL backend 2021-02-05 12:14:46 +01:00
Nikolai Wuttke b5e55bbc09 Properly enable horizontal scrolling 2021-02-05 11:51:28 +01:00
Nikolai Wuttke c7cca65d4b Explicitly query controller mappings env var instead of hardcoding
Normally, SDL is supposed to look at the SDL_GAMECONTROLLERCONFIG_FILE
env var during SDL_Init(). But this doesn't seem to happen on all systems,
so to make sure we have mappings, explicitly query the env var ourselfes.

This replaces the hardcoded path, making it easier to change the path
without having to recompile the text viewer.
2021-02-05 11:28:25 +01:00
Nikolai Wuttke b0a174594f Move controller mappings setup out of run(), and unify printing 2021-02-05 11:10:17 +01:00
Nikolai Wuttke 57e1ce6d77 Merge pull request #11 from shantigilbert/master
Use mappings from  gamecontrollerdb.txt
2021-02-03 10:57:42 +01:00
shantigilbert 87ca192a81 Use mappings from gamecontrollerdb.txt 2021-02-02 19:55:58 -06:00
Nikolai Wuttke 5522985b7f Handle most common escape sequences for non-file input 2021-01-30 14:05:04 +01:00
Nikolai Wuttke 07589b8246 Simplify exit code handling, and a few cleanups 2021-01-30 13:20:24 +01:00
Nikolai Wuttke 96c41d2079 Fix crash when specified file can't be opened 2021-01-30 13:04:52 +01:00
Nikolai Wuttke f172cd51ca Add option to specify text without a file 2021-01-30 10:52:16 +01:00
Nikolai Wuttke 36b5f4e4c0 Set initial focus on Yes button if shown 2021-01-29 18:13:02 +01:00
Nikolai Wuttke fdc0c35101 Merge branch 'emuelec_master' 2021-01-29 17:23:57 +01:00
shantigilbert 8f5efab69f Add a yes/no and error arguments
-y will show yes and no buttons and will return 21 on exit with yes, 0 with no
-e will set the background to red to make clear this is an error
2021-01-29 16:56:07 +01:00
shantigilbert 5d505f06f7 Quick close using start button 2021-01-29 16:52:10 +01:00
Nikolai Wuttke 7ec1a186d4 Update README 2021-01-15 20:50:16 +01:00
Nikolai Wuttke 7f0d4aaebc Update README 2021-01-15 19:00:42 +01:00
Nikolai Wuttke 5ee09fd95d Add a close button 2021-01-15 18:54:47 +01:00
Nikolai Wuttke 6855e0f183 Add font size and title options 2021-01-15 18:14:50 +01:00
Nikolai Wuttke 45412c03a5 Introduce command line argument parser 2021-01-15 17:55:22 +01:00
Nikolai Wuttke 639423b15b Upgrade to C++ 17 2021-01-15 17:00:38 +01:00
Nikolai Wuttke 6f8a32b499 Update formatting and coding style, extract function 2021-01-15 16:56:07 +01:00
Nikolai Wuttke 83a9918bbf Add .gitignore 2021-01-15 16:54:35 +01:00
Nikolai Wuttke 56a3c36d69 Import sources and cleanup 2021-01-15 16:41:29 +01:00