mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
Renderer compiles on the Pi again.
For some reason SDL2 won't initialize on the terminal though. Works fine under X, though that isn't an acceptable solution.
This commit is contained in:
parent
09726348b3
commit
5b1cd8fbf8
|
@ -4,9 +4,7 @@
|
||||||
#include <GLES/gl.h>
|
#include <GLES/gl.h>
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
#include <EGL/eglext.h>
|
#include <EGL/eglext.h>
|
||||||
#include "Font.h"
|
#include <SDL.h>
|
||||||
#include <SDL/SDL.h>
|
|
||||||
#include "InputManager.h"
|
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
|
||||||
#ifdef _RPI_
|
#ifdef _RPI_
|
||||||
|
@ -15,7 +13,7 @@
|
||||||
|
|
||||||
namespace Renderer
|
namespace Renderer
|
||||||
{
|
{
|
||||||
SDL_Surface* sdlScreen;
|
SDL_Window* sdlWindow;
|
||||||
|
|
||||||
EGLDisplay display;
|
EGLDisplay display;
|
||||||
EGLSurface surface;
|
EGLSurface surface;
|
||||||
|
@ -44,15 +42,18 @@ namespace Renderer
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
sdlScreen = SDL_SetVideoMode(1, 1, 0, SDL_SWSURFACE);
|
sdlWindow = SDL_CreateWindow("EmulationStation",
|
||||||
if(sdlScreen == NULL)
|
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||||
|
display_width, display_height,
|
||||||
|
0);
|
||||||
|
|
||||||
|
if(sdlWindow == NULL)
|
||||||
{
|
{
|
||||||
LOG(LogError) << "Error creating SDL window for input!";
|
LOG(LogError) << "Error creating SDL window!" << SDL_GetError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG(LogInfo) << "SDL Window created, creating EGL context...";
|
||||||
LOG(LogInfo) << "Creating surface...";
|
|
||||||
|
|
||||||
#ifdef _RPI_
|
#ifdef _RPI_
|
||||||
DISPMANX_ELEMENT_HANDLE_T dispman_element;
|
DISPMANX_ELEMENT_HANDLE_T dispman_element;
|
||||||
|
@ -198,8 +199,8 @@ namespace Renderer
|
||||||
surface = EGL_NO_SURFACE;
|
surface = EGL_NO_SURFACE;
|
||||||
context = EGL_NO_CONTEXT;
|
context = EGL_NO_CONTEXT;
|
||||||
|
|
||||||
SDL_FreeSurface(sdlScreen);
|
SDL_DestroyWindow(sdlWindow);
|
||||||
sdlScreen = NULL;
|
sdlWindow = NULL;
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue