From 1497dccd63a84b7ee2b229b1ad9c5c02718f2a78 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 19 Mar 2019 23:06:27 +0800 Subject: *rename --- Source/3rdParty/SDL2/src/video/psp/SDL_pspevents.c | 290 ------------------ .../3rdParty/SDL2/src/video/psp/SDL_pspevents_c.h | 31 -- Source/3rdParty/SDL2/src/video/psp/SDL_pspgl.c | 210 ------------- Source/3rdParty/SDL2/src/video/psp/SDL_pspgl_c.h | 54 ---- Source/3rdParty/SDL2/src/video/psp/SDL_pspmouse.c | 41 --- .../3rdParty/SDL2/src/video/psp/SDL_pspmouse_c.h | 24 -- Source/3rdParty/SDL2/src/video/psp/SDL_pspvideo.c | 333 --------------------- Source/3rdParty/SDL2/src/video/psp/SDL_pspvideo.h | 102 ------- 8 files changed, 1085 deletions(-) delete mode 100644 Source/3rdParty/SDL2/src/video/psp/SDL_pspevents.c delete mode 100644 Source/3rdParty/SDL2/src/video/psp/SDL_pspevents_c.h delete mode 100644 Source/3rdParty/SDL2/src/video/psp/SDL_pspgl.c delete mode 100644 Source/3rdParty/SDL2/src/video/psp/SDL_pspgl_c.h delete mode 100644 Source/3rdParty/SDL2/src/video/psp/SDL_pspmouse.c delete mode 100644 Source/3rdParty/SDL2/src/video/psp/SDL_pspmouse_c.h delete mode 100644 Source/3rdParty/SDL2/src/video/psp/SDL_pspvideo.c delete mode 100644 Source/3rdParty/SDL2/src/video/psp/SDL_pspvideo.h (limited to 'Source/3rdParty/SDL2/src/video/psp') diff --git a/Source/3rdParty/SDL2/src/video/psp/SDL_pspevents.c b/Source/3rdParty/SDL2/src/video/psp/SDL_pspevents.c deleted file mode 100644 index 14277b3..0000000 --- a/Source/3rdParty/SDL2/src/video/psp/SDL_pspevents.c +++ /dev/null @@ -1,290 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2018 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ -#include "../../SDL_internal.h" - -#if SDL_VIDEO_DRIVER_PSP - -/* Being a null driver, there's no event stream. We just define stubs for - most of the API. */ - -#include "SDL.h" -#include "../../events/SDL_sysevents.h" -#include "../../events/SDL_events_c.h" -#include "../../events/SDL_keyboard_c.h" -#include "SDL_pspvideo.h" -#include "SDL_pspevents_c.h" -#include "SDL_keyboard.h" -#include "../../thread/SDL_systhread.h" -#include - -#ifdef PSPIRKEYB -#include -#include - -#define IRKBD_CONFIG_FILE NULL /* this will take ms0:/seplugins/pspirkeyb.ini */ - -static int irkbd_ready = 0; -static SDL_Keycode keymap[256]; -#endif - -static enum PspHprmKeys hprm = 0; -static SDL_sem *event_sem = NULL; -static SDL_Thread *thread = NULL; -static int running = 0; -static struct { - enum PspHprmKeys id; - SDL_Keycode sym; -} keymap_psp[] = { - { PSP_HPRM_PLAYPAUSE, SDLK_F10 }, - { PSP_HPRM_FORWARD, SDLK_F11 }, - { PSP_HPRM_BACK, SDLK_F12 }, - { PSP_HPRM_VOL_UP, SDLK_F13 }, - { PSP_HPRM_VOL_DOWN, SDLK_F14 }, - { PSP_HPRM_HOLD, SDLK_F15 } -}; - -int EventUpdate(void *data) -{ - while (running) { - SDL_SemWait(event_sem); - sceHprmPeekCurrentKey(&hprm); - SDL_SemPost(event_sem); - /* Delay 1/60th of a second */ - sceKernelDelayThread(1000000 / 60); - } - return 0; -} - -void PSP_PumpEvents(_THIS) -{ - int i; - enum PspHprmKeys keys; - enum PspHprmKeys changed; - static enum PspHprmKeys old_keys = 0; - SDL_Keysym sym; - - SDL_SemWait(event_sem); - keys = hprm; - SDL_SemPost(event_sem); - - /* HPRM Keyboard */ - changed = old_keys ^ keys; - old_keys = keys; - if(changed) { - for(i=0; i= 0) { - if((length % sizeof(SIrKeybScanCodeData)) == 0){ - count = length / sizeof(SIrKeybScanCodeData); - for( i=0; i < count; i++ ) { - unsigned char raw, pressed; - scanData=(SIrKeybScanCodeData*) buffer+i; - raw = scanData->raw; - pressed = scanData->pressed; - sym.scancode = raw; - sym.sym = keymap[raw]; - /* not tested */ - /* SDL_PrivateKeyboard(pressed?SDL_PRESSED:SDL_RELEASED, &sym); */ - SDL_SendKeyboardKey((keys & keymap_psp[i].id) ? - SDL_PRESSED : SDL_RELEASED, SDL_GetScancodeFromKey(keymap[raw])); - - } - } - } - } -#endif - sceKernelDelayThread(0); - - return; -} - -void PSP_InitOSKeymap(_THIS) -{ -#ifdef PSPIRKEYB - int i; - for (i=0; i - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "SDL_pspvideo.h" - -/* Variables and functions exported by SDL_sysevents.c to other parts - of the native video subsystem (SDL_sysvideo.c) -*/ -extern void PSP_InitOSKeymap(_THIS); -extern void PSP_PumpEvents(_THIS); - -/* end of SDL_pspevents_c.h ... */ - diff --git a/Source/3rdParty/SDL2/src/video/psp/SDL_pspgl.c b/Source/3rdParty/SDL2/src/video/psp/SDL_pspgl.c deleted file mode 100644 index 644fb34..0000000 --- a/Source/3rdParty/SDL2/src/video/psp/SDL_pspgl.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2018 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ -#include "../../SDL_internal.h" - -#if SDL_VIDEO_DRIVER_PSP - -#include -#include - -#include "SDL_error.h" -#include "SDL_pspvideo.h" -#include "SDL_pspgl_c.h" - -/*****************************************************************************/ -/* SDL OpenGL/OpenGL ES functions */ -/*****************************************************************************/ -#define EGLCHK(stmt) \ - do { \ - EGLint err; \ - \ - stmt; \ - err = eglGetError(); \ - if (err != EGL_SUCCESS) { \ - SDL_SetError("EGL error %d", err); \ - return 0; \ - } \ - } while (0) - -int -PSP_GL_LoadLibrary(_THIS, const char *path) -{ - return 0; -} - -/* pspgl doesn't provide this call, so stub it out since SDL requires it. -#define GLSTUB(func,params) void func params {} - -GLSTUB(glOrtho,(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, - GLdouble zNear, GLdouble zFar)) -*/ -void * -PSP_GL_GetProcAddress(_THIS, const char *proc) -{ - return eglGetProcAddress(proc); -} - -void -PSP_GL_UnloadLibrary(_THIS) -{ - eglTerminate(_this->gl_data->display); -} - -static EGLint width = 480; -static EGLint height = 272; - -SDL_GLContext -PSP_GL_CreateContext(_THIS, SDL_Window * window) -{ - - SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata; - - EGLint attribs[32]; - EGLDisplay display; - EGLContext context; - EGLSurface surface; - EGLConfig config; - EGLint num_configs; - int i; - - - /* EGL init taken from glutCreateWindow() in PSPGL's glut.c. */ - EGLCHK(display = eglGetDisplay(0)); - EGLCHK(eglInitialize(display, NULL, NULL)); - wdata->uses_gles = SDL_TRUE; - window->flags |= SDL_WINDOW_FULLSCREEN; - - /* Setup the config based on SDL's current values. */ - i = 0; - attribs[i++] = EGL_RED_SIZE; - attribs[i++] = _this->gl_config.red_size; - attribs[i++] = EGL_GREEN_SIZE; - attribs[i++] = _this->gl_config.green_size; - attribs[i++] = EGL_BLUE_SIZE; - attribs[i++] = _this->gl_config.blue_size; - attribs[i++] = EGL_DEPTH_SIZE; - attribs[i++] = _this->gl_config.depth_size; - - if (_this->gl_config.alpha_size) - { - attribs[i++] = EGL_ALPHA_SIZE; - attribs[i++] = _this->gl_config.alpha_size; - } - if (_this->gl_config.stencil_size) - { - attribs[i++] = EGL_STENCIL_SIZE; - attribs[i++] = _this->gl_config.stencil_size; - } - - attribs[i++] = EGL_NONE; - - EGLCHK(eglChooseConfig(display, attribs, &config, 1, &num_configs)); - - if (num_configs == 0) - { - SDL_SetError("No valid EGL configs for requested mode"); - return 0; - } - - EGLCHK(eglGetConfigAttrib(display, config, EGL_WIDTH, &width)); - EGLCHK(eglGetConfigAttrib(display, config, EGL_HEIGHT, &height)); - - EGLCHK(context = eglCreateContext(display, config, NULL, NULL)); - EGLCHK(surface = eglCreateWindowSurface(display, config, 0, NULL)); - EGLCHK(eglMakeCurrent(display, surface, surface, context)); - - _this->gl_data->display = display; - _this->gl_data->context = context; - _this->gl_data->surface = surface; - - - return context; -} - -int -PSP_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) -{ - if (!eglMakeCurrent(_this->gl_data->display, _this->gl_data->surface, - _this->gl_data->surface, _this->gl_data->context)) - { - return SDL_SetError("Unable to make EGL context current"); - } - return 0; -} - -int -PSP_GL_SetSwapInterval(_THIS, int interval) -{ - EGLBoolean status; - status = eglSwapInterval(_this->gl_data->display, interval); - if (status == EGL_TRUE) { - /* Return success to upper level */ - _this->gl_data->swapinterval = interval; - return 0; - } - /* Failed to set swap interval */ - return SDL_SetError("Unable to set the EGL swap interval"); -} - -int -PSP_GL_GetSwapInterval(_THIS) -{ - return _this->gl_data->swapinterval; -} - -int -PSP_GL_SwapWindow(_THIS, SDL_Window * window) -{ - if (!eglSwapBuffers(_this->gl_data->display, _this->gl_data->surface)) { - return SDL_SetError("eglSwapBuffers() failed"); - } - return 0; -} - -void -PSP_GL_DeleteContext(_THIS, SDL_GLContext context) -{ - SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; - EGLBoolean status; - - if (phdata->egl_initialized != SDL_TRUE) { - SDL_SetError("PSP: GLES initialization failed, no OpenGL ES support"); - return; - } - - /* Check if OpenGL ES connection has been initialized */ - if (_this->gl_data->display != EGL_NO_DISPLAY) { - if (context != EGL_NO_CONTEXT) { - status = eglDestroyContext(_this->gl_data->display, context); - if (status != EGL_TRUE) { - /* Error during OpenGL ES context destroying */ - SDL_SetError("PSP: OpenGL ES context destroy error"); - return; - } - } - } - - return; -} - -#endif /* SDL_VIDEO_DRIVER_PSP */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Source/3rdParty/SDL2/src/video/psp/SDL_pspgl_c.h b/Source/3rdParty/SDL2/src/video/psp/SDL_pspgl_c.h deleted file mode 100644 index 49300fb..0000000 --- a/Source/3rdParty/SDL2/src/video/psp/SDL_pspgl_c.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2018 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SDL_pspgl_c_h_ -#define SDL_pspgl_c_h_ - - -#include -#include - -#include "SDL_pspvideo.h" - - -typedef struct SDL_GLDriverData { - EGLDisplay display; - EGLContext context; - EGLSurface surface; - uint32_t swapinterval; -}SDL_GLDriverData; - -extern void * PSP_GL_GetProcAddress(_THIS, const char *proc); -extern int PSP_GL_MakeCurrent(_THIS,SDL_Window * window, SDL_GLContext context); -extern void PSP_GL_SwapBuffers(_THIS); - -extern int PSP_GL_SwapWindow(_THIS, SDL_Window * window); -extern SDL_GLContext PSP_GL_CreateContext(_THIS, SDL_Window * window); - -extern int PSP_GL_LoadLibrary(_THIS, const char *path); -extern void PSP_GL_UnloadLibrary(_THIS); -extern int PSP_GL_SetSwapInterval(_THIS, int interval); -extern int PSP_GL_GetSwapInterval(_THIS); - - -#endif /* SDL_pspgl_c_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Source/3rdParty/SDL2/src/video/psp/SDL_pspmouse.c b/Source/3rdParty/SDL2/src/video/psp/SDL_pspmouse.c deleted file mode 100644 index bd34dfa..0000000 --- a/Source/3rdParty/SDL2/src/video/psp/SDL_pspmouse.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2018 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ -#include "../../SDL_internal.h" - -#if SDL_VIDEO_DRIVER_PSP - -#include - -#include "SDL_error.h" -#include "SDL_mouse.h" -#include "../../events/SDL_events_c.h" - -#include "SDL_pspmouse_c.h" - - -/* The implementation dependent data for the window manager cursor */ -struct WMcursor { - int unused; -}; - -#endif /* SDL_VIDEO_DRIVER_PSP */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Source/3rdParty/SDL2/src/video/psp/SDL_pspmouse_c.h b/Source/3rdParty/SDL2/src/video/psp/SDL_pspmouse_c.h deleted file mode 100644 index 2d2640e..0000000 --- a/Source/3rdParty/SDL2/src/video/psp/SDL_pspmouse_c.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2018 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "SDL_pspvideo.h" - -/* Functions to be exported */ diff --git a/Source/3rdParty/SDL2/src/video/psp/SDL_pspvideo.c b/Source/3rdParty/SDL2/src/video/psp/SDL_pspvideo.c deleted file mode 100644 index 8231779..0000000 --- a/Source/3rdParty/SDL2/src/video/psp/SDL_pspvideo.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2018 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "../../SDL_internal.h" - -#if SDL_VIDEO_DRIVER_PSP - -/* SDL internals */ -#include "../SDL_sysvideo.h" -#include "SDL_version.h" -#include "SDL_syswm.h" -#include "SDL_loadso.h" -#include "SDL_events.h" -#include "../../events/SDL_mouse_c.h" -#include "../../events/SDL_keyboard_c.h" - - - -/* PSP declarations */ -#include "SDL_pspvideo.h" -#include "SDL_pspevents_c.h" -#include "SDL_pspgl_c.h" - -/* unused -static SDL_bool PSP_initialized = SDL_FALSE; -*/ -static int -PSP_Available(void) -{ - return 1; -} - -static void -PSP_Destroy(SDL_VideoDevice * device) -{ -/* SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata; */ - - if (device->driverdata != NULL) { - device->driverdata = NULL; - } -} - -static SDL_VideoDevice * -PSP_Create() -{ - SDL_VideoDevice *device; - SDL_VideoData *phdata; - SDL_GLDriverData *gldata; - int status; - - /* Check if PSP could be initialized */ - status = PSP_Available(); - if (status == 0) { - /* PSP could not be used */ - return NULL; - } - - /* Initialize SDL_VideoDevice structure */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (device == NULL) { - SDL_OutOfMemory(); - return NULL; - } - - /* Initialize internal PSP specific data */ - phdata = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); - if (phdata == NULL) { - SDL_OutOfMemory(); - SDL_free(device); - return NULL; - } - - gldata = (SDL_GLDriverData *) SDL_calloc(1, sizeof(SDL_GLDriverData)); - if (gldata == NULL) { - SDL_OutOfMemory(); - SDL_free(device); - SDL_free(phdata); - return NULL; - } - device->gl_data = gldata; - - device->driverdata = phdata; - - phdata->egl_initialized = SDL_TRUE; - - - /* Setup amount of available displays */ - device->num_displays = 0; - - /* Set device free function */ - device->free = PSP_Destroy; - - /* Setup all functions which we can handle */ - device->VideoInit = PSP_VideoInit; - device->VideoQuit = PSP_VideoQuit; - device->GetDisplayModes = PSP_GetDisplayModes; - device->SetDisplayMode = PSP_SetDisplayMode; - device->CreateSDLWindow = PSP_CreateWindow; - device->CreateSDLWindowFrom = PSP_CreateWindowFrom; - device->SetWindowTitle = PSP_SetWindowTitle; - device->SetWindowIcon = PSP_SetWindowIcon; - device->SetWindowPosition = PSP_SetWindowPosition; - device->SetWindowSize = PSP_SetWindowSize; - device->ShowWindow = PSP_ShowWindow; - device->HideWindow = PSP_HideWindow; - device->RaiseWindow = PSP_RaiseWindow; - device->MaximizeWindow = PSP_MaximizeWindow; - device->MinimizeWindow = PSP_MinimizeWindow; - device->RestoreWindow = PSP_RestoreWindow; - device->SetWindowGrab = PSP_SetWindowGrab; - device->DestroyWindow = PSP_DestroyWindow; -#if 0 - device->GetWindowWMInfo = PSP_GetWindowWMInfo; -#endif - device->GL_LoadLibrary = PSP_GL_LoadLibrary; - device->GL_GetProcAddress = PSP_GL_GetProcAddress; - device->GL_UnloadLibrary = PSP_GL_UnloadLibrary; - device->GL_CreateContext = PSP_GL_CreateContext; - device->GL_MakeCurrent = PSP_GL_MakeCurrent; - device->GL_SetSwapInterval = PSP_GL_SetSwapInterval; - device->GL_GetSwapInterval = PSP_GL_GetSwapInterval; - device->GL_SwapWindow = PSP_GL_SwapWindow; - device->GL_DeleteContext = PSP_GL_DeleteContext; - device->HasScreenKeyboardSupport = PSP_HasScreenKeyboardSupport; - device->ShowScreenKeyboard = PSP_ShowScreenKeyboard; - device->HideScreenKeyboard = PSP_HideScreenKeyboard; - device->IsScreenKeyboardShown = PSP_IsScreenKeyboardShown; - - device->PumpEvents = PSP_PumpEvents; - - return device; -} - -VideoBootStrap PSP_bootstrap = { - "PSP", - "PSP Video Driver", - PSP_Available, - PSP_Create -}; - -/*****************************************************************************/ -/* SDL Video and Display initialization/handling functions */ -/*****************************************************************************/ -int -PSP_VideoInit(_THIS) -{ - SDL_VideoDisplay display; - SDL_DisplayMode current_mode; - - SDL_zero(current_mode); - - current_mode.w = 480; - current_mode.h = 272; - - current_mode.refresh_rate = 60; - /* 32 bpp for default */ - current_mode.format = SDL_PIXELFORMAT_ABGR8888; - - current_mode.driverdata = NULL; - - SDL_zero(display); - display.desktop_mode = current_mode; - display.current_mode = current_mode; - display.driverdata = NULL; - - SDL_AddVideoDisplay(&display); - - return 1; -} - -void -PSP_VideoQuit(_THIS) -{ - -} - -void -PSP_GetDisplayModes(_THIS, SDL_VideoDisplay * display) -{ - -} - -int -PSP_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) -{ - return 0; -} -#define EGLCHK(stmt) \ - do { \ - EGLint err; \ - \ - stmt; \ - err = eglGetError(); \ - if (err != EGL_SUCCESS) { \ - SDL_SetError("EGL error %d", err); \ - return 0; \ - } \ - } while (0) - -int -PSP_CreateWindow(_THIS, SDL_Window * window) -{ - SDL_WindowData *wdata; - - /* Allocate window internal data */ - wdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); - if (wdata == NULL) { - return SDL_OutOfMemory(); - } - - /* Setup driver data for this window */ - window->driverdata = wdata; - - - /* Window has been successfully created */ - return 0; -} - -int -PSP_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) -{ - return SDL_Unsupported(); -} - -void -PSP_SetWindowTitle(_THIS, SDL_Window * window) -{ -} -void -PSP_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) -{ -} -void -PSP_SetWindowPosition(_THIS, SDL_Window * window) -{ -} -void -PSP_SetWindowSize(_THIS, SDL_Window * window) -{ -} -void -PSP_ShowWindow(_THIS, SDL_Window * window) -{ -} -void -PSP_HideWindow(_THIS, SDL_Window * window) -{ -} -void -PSP_RaiseWindow(_THIS, SDL_Window * window) -{ -} -void -PSP_MaximizeWindow(_THIS, SDL_Window * window) -{ -} -void -PSP_MinimizeWindow(_THIS, SDL_Window * window) -{ -} -void -PSP_RestoreWindow(_THIS, SDL_Window * window) -{ -} -void -PSP_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) -{ - -} -void -PSP_DestroyWindow(_THIS, SDL_Window * window) -{ -} - -/*****************************************************************************/ -/* SDL Window Manager function */ -/*****************************************************************************/ -#if 0 -SDL_bool -PSP_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) -{ - if (info->version.major <= SDL_MAJOR_VERSION) { - return SDL_TRUE; - } else { - SDL_SetError("Application not compiled with SDL %d.%d", - SDL_MAJOR_VERSION, SDL_MINOR_VERSION); - return SDL_FALSE; - } - - /* Failed to get window manager information */ - return SDL_FALSE; -} -#endif - - -/* TO Write Me */ -SDL_bool PSP_HasScreenKeyboardSupport(_THIS) -{ - return SDL_FALSE; -} -void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window) -{ -} -void PSP_HideScreenKeyboard(_THIS, SDL_Window *window) -{ -} -SDL_bool PSP_IsScreenKeyboardShown(_THIS, SDL_Window *window) -{ - return SDL_FALSE; -} - - -#endif /* SDL_VIDEO_DRIVER_PSP */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Source/3rdParty/SDL2/src/video/psp/SDL_pspvideo.h b/Source/3rdParty/SDL2/src/video/psp/SDL_pspvideo.h deleted file mode 100644 index 741bad1..0000000 --- a/Source/3rdParty/SDL2/src/video/psp/SDL_pspvideo.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2018 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SDL_pspvideo_h_ -#define SDL_pspvideo_h_ - -#include - -#include "../../SDL_internal.h" -#include "../SDL_sysvideo.h" - -typedef struct SDL_VideoData -{ - SDL_bool egl_initialized; /* OpenGL ES device initialization status */ - uint32_t egl_refcount; /* OpenGL ES reference count */ - - - -} SDL_VideoData; - - -typedef struct SDL_DisplayData -{ - -} SDL_DisplayData; - - -typedef struct SDL_WindowData -{ - SDL_bool uses_gles; /* if true window must support OpenGL ES */ - -} SDL_WindowData; - - - - -/****************************************************************************/ -/* SDL_VideoDevice functions declaration */ -/****************************************************************************/ - -/* Display and window functions */ -int PSP_VideoInit(_THIS); -void PSP_VideoQuit(_THIS); -void PSP_GetDisplayModes(_THIS, SDL_VideoDisplay * display); -int PSP_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); -int PSP_CreateWindow(_THIS, SDL_Window * window); -int PSP_CreateWindowFrom(_THIS, SDL_Window * window, const void *data); -void PSP_SetWindowTitle(_THIS, SDL_Window * window); -void PSP_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon); -void PSP_SetWindowPosition(_THIS, SDL_Window * window); -void PSP_SetWindowSize(_THIS, SDL_Window * window); -void PSP_ShowWindow(_THIS, SDL_Window * window); -void PSP_HideWindow(_THIS, SDL_Window * window); -void PSP_RaiseWindow(_THIS, SDL_Window * window); -void PSP_MaximizeWindow(_THIS, SDL_Window * window); -void PSP_MinimizeWindow(_THIS, SDL_Window * window); -void PSP_RestoreWindow(_THIS, SDL_Window * window); -void PSP_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed); -void PSP_DestroyWindow(_THIS, SDL_Window * window); - -/* Window manager function */ -SDL_bool PSP_GetWindowWMInfo(_THIS, SDL_Window * window, - struct SDL_SysWMinfo *info); - -/* OpenGL/OpenGL ES functions */ -int PSP_GL_LoadLibrary(_THIS, const char *path); -void *PSP_GL_GetProcAddress(_THIS, const char *proc); -void PSP_GL_UnloadLibrary(_THIS); -SDL_GLContext PSP_GL_CreateContext(_THIS, SDL_Window * window); -int PSP_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); -int PSP_GL_SetSwapInterval(_THIS, int interval); -int PSP_GL_GetSwapInterval(_THIS); -int PSP_GL_SwapWindow(_THIS, SDL_Window * window); -void PSP_GL_DeleteContext(_THIS, SDL_GLContext context); - -/* PSP on screen keyboard */ -SDL_bool PSP_HasScreenKeyboardSupport(_THIS); -void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window); -void PSP_HideScreenKeyboard(_THIS, SDL_Window *window); -SDL_bool PSP_IsScreenKeyboardShown(_THIS, SDL_Window *window); - -#endif /* SDL_pspvideo_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ -- cgit v1.1-26-g67d0