ref: 11fb3911a6ddb8073dd658a31f53f749098bb6aa
parent: 5328426b4b04fa0473afa8b0f009037a9a890264
author: Cameron Cawley <ccawley2011@gmail.com>
date: Sat Aug 8 16:58:11 EDT 2020
Update SDL 1.2 backend to reflect recent changes
--- a/src/Backends/Audio/SDL1.cpp
+++ b/src/Backends/Audio/SDL1.cpp
@@ -1,7 +1,6 @@
#include "../Audio.h"
#include <stddef.h>
-#include <stdio.h>
#include <string.h>
#include <string>
--- a/src/Backends/Platform/SDL1.cpp
+++ b/src/Backends/Platform/SDL1.cpp
@@ -1,6 +1,8 @@
#include "../Misc.h"
+#include <stdarg.h>
#include <stddef.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
@@ -8,10 +10,10 @@
#include "SDL.h"
#include "../Rendering.h"
+#include "../../Attributes.h"
#include "../../Main.h"
#include "../../Organya.h"
#include "../../Profile.h"
-#include "../../Resource.h"
#define DO_KEY(SDL_KEY, BACKEND_KEY) \
case SDL_KEY: \
@@ -55,8 +57,10 @@
{
}
-bool Backend_GetBasePath(char *string_buffer)
+bool Backend_GetBasePath(std::string *string_buffer)
{
+ (void)string_buffer;
+
return false;
}
@@ -94,13 +98,14 @@
bool Backend_SystemTask(bool active)
{
- if (SDL_PollEvent(NULL) || !active)
- {
- SDL_Event event;
-
- if (!SDL_WaitEvent(&event))
+ if (!active)
+ if (!SDL_WaitEvent(NULL))
return false;
+ SDL_Event event;
+
+ while (SDL_PollEvent(&event))
+ {
switch (event.type)
{
case SDL_KEYUP:
--- a/src/Backends/Rendering/Window/Software/SDL1.cpp
+++ b/src/Backends/Rendering/Window/Software/SDL1.cpp
@@ -1,7 +1,6 @@
#include "../Software.h"
#include <stddef.h>
-#include <stdlib.h>
#include <string>
#include "SDL.h"