Make touch input interpolation configurable
This commit is contained in:
parent
3a8024b235
commit
0ec54fe9d6
Binary file not shown.
|
@ -37,6 +37,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
|||
public byte MicVolume;
|
||||
public byte GBALightSensor;
|
||||
public byte ConsiderAltLag;
|
||||
public byte UseTouchInterpolation;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
|
|
|
@ -225,6 +225,11 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
|||
[DefaultValue(true)]
|
||||
public bool UseRealTime { get; set; }
|
||||
|
||||
[DisplayName("Touch Interpolation")]
|
||||
[Description("If true, touch inputs will be interpolated, creating smoother touch movements. Required to progress in some games. May be undesirable when TASing.")]
|
||||
[DefaultValue(true)]
|
||||
public bool UseTouchInterpolation { get; set; }
|
||||
|
||||
[DisplayName("DSi Mode")]
|
||||
[Description("If true, DSi mode will be used. Forced true if a DSiWare rom is detected.")]
|
||||
[DefaultValue(false)]
|
||||
|
|
|
@ -503,6 +503,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
|||
MicVolume = (byte)(controller.IsPressed("Microphone") ? controller.AxisValue("Mic Volume") : 0),
|
||||
GBALightSensor = (byte)controller.AxisValue("GBA Light Sensor"),
|
||||
ConsiderAltLag = (byte)(_settings.ConsiderAltLag ? 1 : 0),
|
||||
UseTouchInterpolation = (byte)(_activeSyncSettings.UseTouchInterpolation ? 1 : 0),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ struct MyFrameInfo : public FrameInfo
|
|||
u8 MicVolume;
|
||||
u8 GBALightSensor;
|
||||
bool ConsiderAltLag;
|
||||
bool UseTouchInterpolation;
|
||||
};
|
||||
|
||||
static s16 biz_mic_input[735];
|
||||
|
@ -71,8 +72,15 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f)
|
|||
|
||||
if (f->Keys & 0x1000)
|
||||
{
|
||||
// move touch coords incrementally to our new touch point
|
||||
f->NDS->MoveTouch(f->TouchX, f->TouchY);
|
||||
if (f->UseTouchInterpolation)
|
||||
{
|
||||
// move touch coords incrementally to our new touch point
|
||||
f->NDS->MoveTouch(f->TouchX, f->TouchY);
|
||||
}
|
||||
else
|
||||
{
|
||||
f->NDS->TouchScreen(f->TouchX, f->TouchY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -113,8 +121,11 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f)
|
|||
|
||||
if (f->Keys & 0x1000)
|
||||
{
|
||||
// finalize touch after emulation finishes
|
||||
f->NDS->TouchScreen(f->TouchX, f->TouchY);
|
||||
if (f->UseTouchInterpolation)
|
||||
{
|
||||
// finalize touch after emulation finishes
|
||||
f->NDS->TouchScreen(f->TouchX, f->TouchY);
|
||||
}
|
||||
}
|
||||
|
||||
auto& renderer3d = f->NDS->GetRenderer3D();
|
||||
|
|
Loading…
Reference in New Issue