mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 09:19:58 -04:00
Give game 1.1.1 the direct mouse camera: two sites in the camera's input update take the raw mouse counts after the stick's dead zone and curve, and the Controls tab shows the mouse rows again.
The counts are divided by the frames the game steps and by the camera speed, as the game multiplies the processed stick by both, so a count turns the camera 0.08 degrees on both axes at every frame rate and stick camera speed. The 1.4.3 selectors stay off on 1.1.1. NX2NAVI_MOUSE_TRACE=1 logs the camera input updates and the camera's direction for measurements, and tests/mouse_direct_check.py checks the 1.1.1 hooks.
This commit is contained in:
@@ -438,6 +438,16 @@ static double ocarina_step(double dt) {
|
||||
return step;
|
||||
}
|
||||
|
||||
// The 60 Hz frames the game steps at each update where the set ostep gives them (Ocarina); 1 elsewhere, the game's own
|
||||
// nominal frame. The mouse camera divides by it (mouse_direct.c): the game multiplies camera input by this step.
|
||||
float frame_step_frames(void) {
|
||||
if (!ostep_page) return 1.0f;
|
||||
uint32_t bits = atomic_load_explicit(ostep_page, memory_order_acquire);
|
||||
float f;
|
||||
memcpy(&f, &bits, 4);
|
||||
return f > 0 ? f : 1.0f;
|
||||
}
|
||||
|
||||
static void ocarina_step_write(double dt) {
|
||||
static int on = -1;
|
||||
if (on < 0) {
|
||||
|
||||
Reference in New Issue
Block a user