From ee9584f3aa80ff452d5d44add95ecbe59bf6cf11 Mon Sep 17 00:00:00 2001 From: pjgat09 Date: Thu, 2 May 2013 22:08:54 +0000 Subject: [PATCH] N64: Commented out, but rudimentary fake analog stick support by looking at the DPad buttons and basing the analog stick position based on those --- BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs b/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs index 3a74af8f29..5d68b35909 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs @@ -69,6 +69,15 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64 public void FrameAdvance(bool render, bool rendersound) { m64pFrameComplete = false; + /* + sbyte x = 0; + sbyte y = 0; + if (Controller["P1 DPad R"]) x = 80; + if (Controller["P1 DPad L"]) x = -80; + if (Controller["P1 DPad D"]) y = -80; + if (Controller["P1 DPad U"]) y = 80; + InpSetKeys(0, ReadController(1), x, y); + */ InpSetKeys(0, ReadController(1), 0, 0); m64pCoreDoCommandPtr(m64p_command.M64CMD_ADVANCE_FRAME, 0, IntPtr.Zero); while (m64pFrameComplete == false) { } @@ -281,7 +290,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64 // Input plugin specific [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - private delegate int SetKeys(int num, int keys, byte X, byte Y); + private delegate int SetKeys(int num, int keys, sbyte X, sbyte Y); SetKeys InpSetKeys; [UnmanagedFunctionPointer(CallingConvention.Cdecl)]