mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-07 21:56:44 +01:00
mainloop: Switch Vita's CPU and bus to max frequency during loading
This commit is contained in:
parent
b84e0af41f
commit
6486103517
1 changed files with 14 additions and 0 deletions
|
@ -19,6 +19,10 @@
|
|||
|
||||
#include "internal.h"
|
||||
|
||||
#ifdef __vita__
|
||||
#include <psp2/power.h>
|
||||
#endif
|
||||
|
||||
static inline bool HandleEvent(struct Game* game, ALLEGRO_EVENT* ev) {
|
||||
switch (ev->type) {
|
||||
case ALLEGRO_EVENT_DISPLAY_HALT_DRAWING:
|
||||
|
@ -332,6 +336,12 @@ static inline bool MainloopTick(struct Game* game) {
|
|||
if (tmp->pending_load) {
|
||||
#ifdef __EMSCRIPTEN__
|
||||
StopAudio(game);
|
||||
#endif
|
||||
#ifdef __vita__
|
||||
int vita_arm_freq = scePowerGetArmClockFrequency();
|
||||
int vita_bus_freq = scePowerGetBusClockFrequency();
|
||||
scePowerSetArmClockFrequency(444);
|
||||
scePowerSetBusClockFrequency(222);
|
||||
#endif
|
||||
if (tmp->show_loading && game->_priv.loading.gamestate->open) {
|
||||
(*game->_priv.loading.gamestate->api->start)(game, game->_priv.loading.gamestate->data);
|
||||
|
@ -441,6 +451,10 @@ static inline bool MainloopTick(struct Game* game) {
|
|||
game->_priv.timestamp = al_get_time();
|
||||
#ifdef __EMSCRIPTEN__
|
||||
SetupAudio(game);
|
||||
#endif
|
||||
#ifdef __vita__
|
||||
scePowerSetArmClockFrequency(vita_arm_freq);
|
||||
scePowerSetBusClockFrequency(vita_bus_freq);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue