mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 01:15:35 +00:00
make video/pandora to actually compile somehow.
no one ever maintained it for years.. (cherry picked from commit 48b62e2e57e3eea2b84ed3147f5ea9223a8f63bd)
This commit is contained in:
parent
52181848da
commit
9120fbd501
|
@ -41,11 +41,6 @@
|
||||||
static NativeWindowType hNativeWnd = 0; /* A handle to the window we will create. */
|
static NativeWindowType hNativeWnd = 0; /* A handle to the window we will create. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int PND_available(void)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void PND_destroy(SDL_VideoDevice * device)
|
static void PND_destroy(SDL_VideoDevice * device)
|
||||||
{
|
{
|
||||||
if (device->driverdata) {
|
if (device->driverdata) {
|
||||||
|
@ -55,18 +50,10 @@ static void PND_destroy(SDL_VideoDevice * device)
|
||||||
SDL_free(device);
|
SDL_free(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDL_VideoDevice *PND_create()
|
static SDL_VideoDevice *PND_create(void)
|
||||||
{
|
{
|
||||||
SDL_VideoDevice *device;
|
SDL_VideoDevice *device;
|
||||||
SDL_VideoData *phdata;
|
SDL_VideoData *phdata;
|
||||||
int status;
|
|
||||||
|
|
||||||
/* Check if pandora could be initialized */
|
|
||||||
status = PND_available();
|
|
||||||
if (status == 0) {
|
|
||||||
/* PND could not be used */
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize SDL_VideoDevice structure */
|
/* Initialize SDL_VideoDevice structure */
|
||||||
device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
|
device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
|
||||||
|
@ -139,8 +126,8 @@ VideoBootStrap PND_bootstrap = {
|
||||||
"pandora",
|
"pandora",
|
||||||
"SDL Pandora Video Driver",
|
"SDL Pandora Video Driver",
|
||||||
#endif
|
#endif
|
||||||
PND_available,
|
PND_create,
|
||||||
PND_create
|
NULL /* no ShowMessageBox implementation */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -586,16 +573,16 @@ SDL_GLContext PND_gl_createcontext(_THIS, SDL_Window * window)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIZ_GLES_LITE
|
#ifdef WIZ_GLES_LITE
|
||||||
if(!hNativeWnd) {
|
if (!hNativeWnd) {
|
||||||
hNativeWnd = (NativeWindowType)SDL_malloc(16*1024);
|
hNativeWnd = (NativeWindowType)SDL_malloc(16*1024);
|
||||||
|
if (!hNativeWnd) {
|
||||||
if(!hNativeWnd)
|
printf("Error: Wiz framebuffer allocatation failed\n");
|
||||||
printf( "Error: Wiz framebuffer allocatation failed\n" );
|
} else {
|
||||||
else
|
printf("SDL: Wiz framebuffer allocated: %X\n", hNativeWnd);
|
||||||
printf( "SDL: Wiz framebuffer allocated: %X\n", hNativeWnd );
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf( "SDL: Wiz framebuffer already allocated: %X\n", hNativeWnd );
|
printf("SDL: Wiz framebuffer already allocated: %X\n", hNativeWnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
wdata->gles_surface =
|
wdata->gles_surface =
|
||||||
|
@ -787,11 +774,10 @@ void PND_gl_deletecontext(_THIS, SDL_GLContext context)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIZ_GLES_LITE
|
#ifdef WIZ_GLES_LITE
|
||||||
if( hNativeWnd != 0 )
|
if (hNativeWnd != 0) {
|
||||||
{
|
|
||||||
SDL_free(hNativeWnd);
|
SDL_free(hNativeWnd);
|
||||||
hNativeWnd = 0;
|
hNativeWnd = 0;
|
||||||
printf( "SDL: Wiz framebuffer released\n" );
|
printf("SDL: Wiz framebuffer released\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue