Clownacy
bcbb06f092
Fix a leftover printf
2020-04-14 00:29:52 +01:00
Clownacy
c51a074fad
Big disgusting backend rework
...
We need to avoid `WindowsWrapper.h` in the backends whenever we can,
to avoid name collisions (the Wii U homebrew library) defines its own
BOOL/TRUE/FALSE, which really doesn't work with CSE2.
2020-04-13 18:19:39 +01:00
Clownacy
fd0733f6e7
Fix GLFW3 not handling exit event while not focussed
2020-04-13 15:32:34 +01:00
Clownacy
8549fa561e
Avoid WindowsWrapper.h in controller backend
2020-04-13 14:56:48 +01:00
Clownacy
026fea52ff
Untangle Input.cpp from the controller backend
2020-04-13 14:49:07 +01:00
Clownacy
cbb11e6270
Cleanup
2020-04-13 13:43:17 +01:00
Clownacy
9275ad4689
This error should result in failure
2020-04-13 13:35:01 +01:00
Clownacy
cdd97cb733
Some cleanup
2020-04-13 13:34:55 +01:00
Clownacy
4f7cc9582d
Revert "Backends: Added init/de-init messages for backends"
...
This reverts commit 9be8b9a493
.
2020-04-13 13:28:57 +01:00
Gabriel Ravier
9be8b9a493
Backends: Added init/de-init messages for backends
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 02:26:51 +02:00
Gabriel Ravier
690a87dbfd
Backends/GLFW3/Controller: Wrap both sides of if-else with {} equally.
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 00:57:06 +02:00
Gabriel Ravier
77e00a9329
Backends/GLFW3/Controller: Use != NULL
instead of implicit conversion to bool
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 00:55:53 +02:00
Gabriel Ravier
dcd4bcf1b2
Backends: Fix some of the error handling and replaced some printf calls
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 00:42:24 +02:00
Gabriel Ravier
16441ee87b
Backends: Improved miniaudio and GLFW3 error handling
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-11 16:57:04 +02:00
Gabriel Ravier
7f7c3d8434
Backends: Started adding a bunch of error handling stuff (error checking only done in SDL2 for now)
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-10 22:32:29 +02:00
Clownacy
ba069de70e
Fix window resizing
...
If you made the window square, the screen wouldn't be centered
properly.
2020-04-10 00:45:57 +01:00
Clownacy
ba4c9aa55f
Fix GLFW3-Software fullscreen aspect ratio
2020-04-09 20:42:10 +01:00
Clownacy
1f06027403
Added GLFW3 support for the software renderer
...
A few things need cleaning-up
2020-04-09 19:29:45 +01:00
Clownacy
0582fa93d1
Add extra failure error messages
2020-04-09 12:54:28 +01:00
Clownacy
41d5c5b5c8
Make it so Backend_Init
can fail
2020-04-07 17:46:02 +01:00
Clownacy
5395b00a95
Make some backend code safer
2020-04-06 20:05:15 +01:00
Clownacy
eaef25d5da
Change how backend keyboard status stuff works
2020-04-05 13:26:08 +01:00
Clownacy
aef0f81f28
Offload keyboard tracker to the engine
...
Centralising it in the backend breaks the enhanced branch's rebinding
menu.
2020-04-05 04:31:11 +01:00
Clownacy
b6398c58b4
Disable GLFW hats in <3.3
...
Doesn't exist - causes Travis to fail
2020-04-05 03:24:55 +01:00
Clownacy
ee1e7aed11
Fix unfreed memory
2020-04-05 00:58:56 +01:00
Clownacy
67765fd0ad
Fix
2020-04-05 00:54:45 +01:00
Clownacy
26de0b6043
Improve the SDL2 controller backend too
2020-04-05 00:31:17 +01:00
Clownacy
c187660904
Hat cleanup
2020-04-05 00:20:41 +01:00
Clownacy
8fdaea5d8b
More cleanup and fixes
2020-04-05 00:16:19 +01:00
Clownacy
6bb240d335
Fixes
2020-04-05 00:11:52 +01:00
Clownacy
e0674d8f54
Restore support for joystick axes neutrals
...
These are useful for PS3 analogue triggers, which are -1.0f by
default, and go up to 1.0f when pressed.
2020-04-05 00:08:29 +01:00
Clownacy
ac533cb35e
Add support to the GLFW3 backends as well
...
Also fix the SDL2 backend wow
2020-04-04 23:22:22 +01:00
Clownacy
1ae63bea96
Move window ownership to the window backend
2020-04-04 20:51:07 +01:00
Clownacy
135035bb1a
Change 'PlatformBackend' namespace to 'Backend'
2020-04-04 20:31:27 +01:00
Clownacy
4d322be866
Change render backend namespace to RenderBackend_
2020-04-04 20:24:34 +01:00
Clownacy
8acdcface4
Update CMakeLists.txt
2020-04-04 19:56:57 +01:00
Clownacy
4568d58c77
Cleanup
2020-04-04 19:53:16 +01:00
Clownacy
65325e2b34
Add hotplugging support to SDL2 backend
2020-04-04 19:50:52 +01:00
Clownacy
87e8a75df4
Rename GLFW3.h/SDL2.h
2020-04-04 19:18:46 +01:00
Clownacy
e00ad1cd78
Shuffle code
2020-04-04 19:04:56 +01:00
Clownacy
d957c40649
Fix bug
2020-04-04 19:04:20 +01:00
Clownacy
659f89ea85
Cleanup and proper deinitialisation
2020-04-04 19:03:19 +01:00
Clownacy
e874b75357
Comment GLFW3 code, restore some vanilla behaviour
2020-04-04 18:55:44 +01:00
Clownacy
0cf1a781b7
Add hotplugging support to the GLFW3 backend
...
The GLFW windowing backend supports window-resizing, so I don't think
it's wrong to add enhancements to the backend code. It's not like the
SDL2 backend emulates DirectDraw's unstable framerate or anything.
2020-04-04 18:38:56 +01:00
Clownacy
b72b631e95
Simplify GLFW code
2020-04-04 17:47:45 +01:00
Clownacy
39ddfd9791
Abstract-away keyboard input
...
Now, instead of keyboard input being completely-handled in the
backend, it's merely abstracted, while still otherwise being handled
in the game itself. This will be useful for the enhanced branch's
key-rebinding menu.
2020-04-04 17:42:56 +01:00
Clownacy
cb869a4fd1
Support GLFW <3.3
...
Travis's Ubuntu Bionic uses 3.2, causing it to fail.
2020-04-03 18:13:44 +01:00
Clownacy
e15091b207
More fixes
2020-04-03 18:01:01 +01:00
Clownacy
3c691732a6
Update glad #include paths
2020-04-03 17:09:14 +01:00
Clownacy
dac8f704cd
Cleanup and debug prints
2020-04-03 17:02:02 +01:00