Update SDL 1.2 backend to reflect recent changes
This commit is contained in:
parent
5328426b4b
commit
11fb3911a6
3 changed files with 12 additions and 9 deletions
|
@ -1,7 +1,6 @@
|
||||||
#include "../Audio.h"
|
#include "../Audio.h"
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#include "../Misc.h"
|
#include "../Misc.h"
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -8,10 +10,10 @@
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
|
|
||||||
#include "../Rendering.h"
|
#include "../Rendering.h"
|
||||||
|
#include "../../Attributes.h"
|
||||||
#include "../../Main.h"
|
#include "../../Main.h"
|
||||||
#include "../../Organya.h"
|
#include "../../Organya.h"
|
||||||
#include "../../Profile.h"
|
#include "../../Profile.h"
|
||||||
#include "../../Resource.h"
|
|
||||||
|
|
||||||
#define DO_KEY(SDL_KEY, BACKEND_KEY) \
|
#define DO_KEY(SDL_KEY, BACKEND_KEY) \
|
||||||
case SDL_KEY: \
|
case SDL_KEY: \
|
||||||
|
@ -55,8 +57,10 @@ void Backend_PostWindowCreation(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Backend_GetBasePath(char *string_buffer)
|
bool Backend_GetBasePath(std::string *string_buffer)
|
||||||
{
|
{
|
||||||
|
(void)string_buffer;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,13 +98,14 @@ void PlaybackBackend_EnableDragAndDrop(void)
|
||||||
|
|
||||||
bool Backend_SystemTask(bool active)
|
bool Backend_SystemTask(bool active)
|
||||||
{
|
{
|
||||||
if (SDL_PollEvent(NULL) || !active)
|
if (!active)
|
||||||
{
|
if (!SDL_WaitEvent(NULL))
|
||||||
SDL_Event event;
|
|
||||||
|
|
||||||
if (!SDL_WaitEvent(&event))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
SDL_Event event;
|
||||||
|
|
||||||
|
while (SDL_PollEvent(&event))
|
||||||
|
{
|
||||||
switch (event.type)
|
switch (event.type)
|
||||||
{
|
{
|
||||||
case SDL_KEYUP:
|
case SDL_KEYUP:
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "../Software.h"
|
#include "../Software.h"
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
|
|
Loading…
Add table
Reference in a new issue