/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
*/
#include "common/scummsys.h"
#if defined(PSP2)
#include
#include
#include "backends/platform/sdl/psp2/psp2.h"
#include "backends/events/psp2sdl/psp2sdl-events.h"
#include "backends/platform/sdl/sdl.h"
#include "engines/engine.h"
#include "common/util.h"
#include "common/events.h"
#include "common/config-manager.h"
#include "math.h"
void PSP2EventSource::preprocessEvents(SDL_Event *event) {
// prevent suspend (scummvm games contain a lot of cutscenes..)
sceKernelPowerTick(SCE_KERNEL_POWER_TICK_DISABLE_AUTO_SUSPEND);
sceKernelPowerTick(SCE_KERNEL_POWER_TICK_DISABLE_OLED_OFF);
SdlEventSource::preprocessEvents(event);
}
bool PSP2EventSource::isTouchPortTouchpadMode(SDL_TouchID port) {
return port != 1 || ConfMan.getBool("frontpanel_touchpad_mode");
}
bool PSP2EventSource::isTouchPortActive(SDL_TouchID port) {
return port == 1 || ConfMan.getBool("touchpad_mouse_mode");
}
#endif