mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 02:56:09 -04:00
PS1/Saturn: Double FPS (12 to 30 FPS in DuckStation, 10 to 20 FPS in mednafen)
This commit is contained in:
parent
97c3dd8374
commit
427c4f213a
@ -550,13 +550,15 @@ static void Gamepad_Update(int port, float delta) {
|
|||||||
|
|
||||||
void Gamepad_SetButton(int port, int btn, int pressed) {
|
void Gamepad_SetButton(int port, int btn, int pressed) {
|
||||||
struct GamepadDevice* pad = &Gamepad_Devices[port];
|
struct GamepadDevice* pad = &Gamepad_Devices[port];
|
||||||
|
pressed = pressed != 0;
|
||||||
|
|
||||||
btn -= GAMEPAD_BEG_BTN;
|
btn -= GAMEPAD_BEG_BTN;
|
||||||
/* Repeat down is handled in Gamepad_Update instead */
|
/* Repeat down is handled in Gamepad_Update instead */
|
||||||
if (pressed && pad->pressed[btn]) return;
|
if (pressed == pad->pressed[btn]) return;
|
||||||
|
|
||||||
/* Reset hold tracking time */
|
/* Reset hold tracking time */
|
||||||
if (pressed && !pad->pressed[btn]) pad->holdtime[btn] = 0;
|
if (pressed && !pad->pressed[btn]) pad->holdtime[btn] = 0;
|
||||||
pad->pressed[btn] = pressed != 0;
|
pad->pressed[btn] = pressed;
|
||||||
|
|
||||||
Gamepad_Apply(port, btn, false, pressed);
|
Gamepad_Apply(port, btn, false, pressed);
|
||||||
}
|
}
|
||||||
|
@ -148,6 +148,10 @@ static void HUDScreen_BuildPosition(struct HUDScreen* s, struct VertexTextured*
|
|||||||
TextAtlas_AddInt(atlas, pos.z, &cur);
|
TextAtlas_AddInt(atlas, pos.z, &cur);
|
||||||
TextAtlas_Add(atlas, 14, &cur);
|
TextAtlas_Add(atlas, 14, &cur);
|
||||||
|
|
||||||
|
s->lastX = pos.x;
|
||||||
|
s->lastY = pos.y;
|
||||||
|
s->lastZ = pos.z;
|
||||||
|
|
||||||
s->posCount = (int)(cur - data);
|
s->posCount = (int)(cur - data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,8 +346,9 @@ static void HUDScreen_Update(void* screen, float delta) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IVec3_Floor(&pos, &Entities.CurPlayer->Base.Position);
|
IVec3_Floor(&pos, &Entities.CurPlayer->Base.Position);
|
||||||
if (pos.x != s->lastX || pos.y != s->lastY || pos.z != s->lastZ)
|
if (pos.x != s->lastX || pos.y != s->lastY || pos.z != s->lastZ) {
|
||||||
s->dirty = true;
|
s->dirty = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CH_EXTENT 16
|
#define CH_EXTENT 16
|
||||||
|
Loading…
x
Reference in New Issue
Block a user