Commit graph

2143 commits

Author SHA1 Message Date
Clownacy
3a72dd6bee Add Wii U compilation instructions to readme 2020-04-15 02:38:38 +01:00
Clownacy
d9f62453a6 Remove a dead function prototype 2020-04-15 02:20:59 +01:00
Clownacy
b5eefd95f0 Change Wii U input to keyboard emulation
The keyboard API allows me to bind multiple buttons to the direction
keys, unlike the controller API. I probably need to rethink the
controller API at some point.
2020-04-15 02:16:13 +01:00
Clownacy
470a51219e Fix WiiU builds with LTO enabled
For some reason, LTO affects how `ReadVPAD` handles failure, causing
it to spam gamepad button inputs. With proper error-checking, this is
fixed.
2020-04-14 03:50:33 +01:00
Clownacy
38ea875e11 Add new backends to readme 2020-04-14 01:35:18 +01:00
Clownacy
6d53668bed Add Wii U platform backend
With this backend, CSE2 can run on the Wii U.

It's not ideal - it doesn't have its own renderer yet, so it just
uses the software renderer, and it only displays on the gamepad,
because drawing to the TV as well makes the game lag.

Also there's no sound.

Also the lack of input rebinding is annoying.
2020-04-14 00:31:13 +01:00
Clownacy
bcbb06f092 Fix a leftover printf 2020-04-14 00:29:52 +01:00
Clownacy
db0b2d0293 Add option to disable DoConfig
Needed for console ports
2020-04-13 19:10:58 +01:00
Clownacy
f4f85f1f9d Add Null platform backend
Also does absolute nothing.

The point of these things is so it's easier to test out new ports.
For example, with the Null backends and the software renderer, we
don't need to write any code to build for other platforms.

In addition, by having no platform-dependant code, this can be used
to trace crashes. For example, I was having crashes on the Wii U,
despite there being no Wii U-specific code at all - the cause turned
out to be that the executable wasn't stripped, and it had nothing to
do with the code at all.
2020-04-13 18:54:34 +01:00
Clownacy
02f570cec7 Add Null audio backend
Literally doesn't do anything
2020-04-13 18:31:39 +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
58fc9a392a More cleanup 2020-04-13 13:56:29 +01:00
Clownacy
aa9e486086 Handle WindowBackend_Software_CreateWindow fail
Must have been part of that commit I reverted
2020-04-13 13:49:21 +01:00
Clownacy
d70e31d221 Cleanup 2020-04-13 13:47:57 +01:00
Clownacy
cbb11e6270 Cleanup 2020-04-13 13:43:17 +01:00
Clownacy
8fbf3bbecf Account for GetVertexBufferSlot failure 2020-04-13 13:40:35 +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
Clownacy
063ec2a92a
Merge pull request #111 from GabrielRavier/portableAddImprovedErrorHandlingBackends
Added improved error handling to Backend code
2020-04-13 13:27:04 +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
53e2b715d4 Backends/SDL2/Misc: !x -> x == NULL
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:19:35 +02:00
Gabriel Ravier
d0b8aef281 Backends/SDL2/Controller: !x -> x == 0
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:18:19 +02:00
Gabriel Ravier
92d565692a Backends: Use "SDL" instead of "SDL2" to match documentation vocabulary
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:16:45 +02:00
Gabriel Ravier
5ed34e73d4 Backends/Rendering/SDLTexture: Used Uint8 instead of uint8_t to match SDL_SetRenderDrawColor
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:11:13 +02:00
Gabriel Ravier
4301fc613e Backends/Rendering/SDLTexture: !x -> x == NULL
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:10:15 +02:00
Gabriel Ravier
9ad14b897e Backends/Rendering/SDLTexture: !x -> x == NULL
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:09:30 +02:00
Gabriel Ravier
3f0d8b2e6f Backends/SDL2/Window-Software: !x -> x == NULL
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:08:26 +02:00
Gabriel Ravier
b58cfcdd2f Backends/SDL2/Window-Software: Removed un-needed braces
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:05:37 +02:00
Gabriel Ravier
d41bf46c1a Backends/SDL2/Controller: x -> x != NULL and removed unnecessary braces
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:04:23 +02:00
Gabriel Ravier
d870805068 Backends/SDL2/Controller: x -> x != NULL and fixed unequal braces
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:03:18 +02:00
Gabriel Ravier
a763984486 Backends/Rendering/SDLSurface: !x -> x == NULL
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:01:38 +02:00
Gabriel Ravier
2feba10654 Backends/Rendering/SDLSurface: Invert if and use != NULL instead of implicit conversion to bool
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:00:44 +02:00
Gabriel Ravier
65e7164c42 Backends/Rendering/OpenGL3: Use != NULL instead of implicit conversion to bool
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 00:59:02 +02:00
Gabriel Ravier
4d10c2cc21 Backends/Rendering/OpenGL3: Wrap both sides of if-else with {} equally.
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 00:58:09 +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
1a5da443d7 Backends/Rendering/OpenGL3: Fixed OpenGLES2 compile
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 00:55:12 +02:00
Gabriel Ravier
27eb7d1788 Backend/Audio/SDL2: Replace puts call with Backend_PrintInfo
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 00:49:22 +02:00
Gabriel Ravier
89fb2222b6 Backends/Rendering/OpenGL: Replaced printf with Backend_PrintInfo
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 00:46:05 +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
5fc0f58525 Backends/SDL2: Finished up improving error handling
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 00:24:30 +02:00
Gabriel Ravier
12d45ac1ed Merge branch 'portable' into portableAddImprovedErrorHandlingBackends 2020-04-11 23:30:43 +02:00
Gabriel Ravier
4127efb8f8 Backends/SDL2/Controller: Start improving error handling
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-11 23:29:49 +02:00
Gabriel Ravier
f2b2c071a2 Backends/Rendering/OpenGL3: Improve error handling
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-11 23:28:31 +02:00
Clownacy
ba2f43bc67 Fix bug in SDL2 controller backend 2020-04-11 22:17:53 +01:00
Gabriel Ravier
b45412992b external/glad: Used c-debug configuration in order to have extra debug utilities
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-11 21:40:55 +02:00