mirror of https://github.com/encounter/SDL.git
Vita: add support for disabling 'screensaver' (screen dimming and suspend)
This commit is contained in:
parent
79ec8986d3
commit
8d1e0ca324
|
@ -2246,6 +2246,7 @@ elseif(VITA)
|
||||||
SceHid_stub
|
SceHid_stub
|
||||||
SceMotion_stub
|
SceMotion_stub
|
||||||
ScePower_stub
|
ScePower_stub
|
||||||
|
SceProcessmgr_stub
|
||||||
m
|
m
|
||||||
)
|
)
|
||||||
if(HAVE_VIDEO_VITA_PIB)
|
if(HAVE_VIDEO_VITA_PIB)
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "../../events/SDL_keyboard_c.h"
|
#include "../../events/SDL_keyboard_c.h"
|
||||||
|
|
||||||
/* VITA declarations */
|
/* VITA declarations */
|
||||||
|
#include <psp2/kernel/processmgr.h>
|
||||||
#include "SDL_vitavideo.h"
|
#include "SDL_vitavideo.h"
|
||||||
#include "SDL_vitatouch.h"
|
#include "SDL_vitatouch.h"
|
||||||
#include "SDL_vitakeyboard.h"
|
#include "SDL_vitakeyboard.h"
|
||||||
|
@ -346,8 +347,8 @@ VITA_RestoreWindow(_THIS, SDL_Window * window)
|
||||||
void
|
void
|
||||||
VITA_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
VITA_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VITA_DestroyWindow(_THIS, SDL_Window * window)
|
VITA_DestroyWindow(_THIS, SDL_Window * window)
|
||||||
{
|
{
|
||||||
|
@ -555,6 +556,12 @@ void VITA_PumpEvents(_THIS)
|
||||||
#if !defined(SDL_VIDEO_VITA_PVR)
|
#if !defined(SDL_VIDEO_VITA_PVR)
|
||||||
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
|
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (_this->suspend_screensaver) {
|
||||||
|
// cancel all idle timers to prevent vita going to sleep
|
||||||
|
sceKernelPowerTick(SCE_KERNEL_POWER_TICK_DEFAULT);
|
||||||
|
}
|
||||||
|
|
||||||
VITA_PollTouch();
|
VITA_PollTouch();
|
||||||
VITA_PollKeyboard();
|
VITA_PollKeyboard();
|
||||||
VITA_PollMouse();
|
VITA_PollMouse();
|
||||||
|
|
|
@ -38,7 +38,6 @@ typedef struct SDL_VideoData
|
||||||
|
|
||||||
SceWChar16 ime_buffer[SCE_IME_DIALOG_MAX_TEXT_LENGTH];
|
SceWChar16 ime_buffer[SCE_IME_DIALOG_MAX_TEXT_LENGTH];
|
||||||
SDL_bool ime_active;
|
SDL_bool ime_active;
|
||||||
|
|
||||||
} SDL_VideoData;
|
} SDL_VideoData;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue