mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-08 06:06:43 +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"
|
#include "internal.h"
|
||||||
|
|
||||||
|
#ifdef __vita__
|
||||||
|
#include <psp2/power.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline bool HandleEvent(struct Game* game, ALLEGRO_EVENT* ev) {
|
static inline bool HandleEvent(struct Game* game, ALLEGRO_EVENT* ev) {
|
||||||
switch (ev->type) {
|
switch (ev->type) {
|
||||||
case ALLEGRO_EVENT_DISPLAY_HALT_DRAWING:
|
case ALLEGRO_EVENT_DISPLAY_HALT_DRAWING:
|
||||||
|
@ -332,6 +336,12 @@ static inline bool MainloopTick(struct Game* game) {
|
||||||
if (tmp->pending_load) {
|
if (tmp->pending_load) {
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
StopAudio(game);
|
StopAudio(game);
|
||||||
|
#endif
|
||||||
|
#ifdef __vita__
|
||||||
|
int vita_arm_freq = scePowerGetArmClockFrequency();
|
||||||
|
int vita_bus_freq = scePowerGetBusClockFrequency();
|
||||||
|
scePowerSetArmClockFrequency(444);
|
||||||
|
scePowerSetBusClockFrequency(222);
|
||||||
#endif
|
#endif
|
||||||
if (tmp->show_loading && game->_priv.loading.gamestate->open) {
|
if (tmp->show_loading && game->_priv.loading.gamestate->open) {
|
||||||
(*game->_priv.loading.gamestate->api->start)(game, game->_priv.loading.gamestate->data);
|
(*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();
|
game->_priv.timestamp = al_get_time();
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
SetupAudio(game);
|
SetupAudio(game);
|
||||||
|
#endif
|
||||||
|
#ifdef __vita__
|
||||||
|
scePowerSetArmClockFrequency(vita_arm_freq);
|
||||||
|
scePowerSetBusClockFrequency(vita_bus_freq);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue