Frame: Make TAS dialogs private

Amends the TAS callbacks to internally store functions using
std::function instead of raw function pointers. This allows binding
extra contextual state via lambda functions, as well as keeping the
dialogs internal to the main frame (on top of being a more flexible
interface).
This commit is contained in:
Lioncash
2017-04-02 01:45:11 -04:00
parent a65a176777
commit 7f0203a5b0
5 changed files with 35 additions and 37 deletions

View File

@ -4,6 +4,7 @@
#pragma once
#include <functional>
#include <string>
#include "Common/CommonTypes.h"
@ -181,8 +182,9 @@ std::string GetInputDisplay();
std::string GetRTCDisplay();
// Done this way to avoid mixing of core and gui code
typedef void (*GCManipFunction)(GCPadStatus*, int);
typedef void (*WiiManipFunction)(u8*, WiimoteEmu::ReportFeatures, int, int, wiimote_key);
using GCManipFunction = std::function<void(GCPadStatus*, int)>;
using WiiManipFunction =
std::function<void(u8*, WiimoteEmu::ReportFeatures, int, int, wiimote_key)>;
void SetGCInputManip(GCManipFunction);
void SetWiiInputManip(WiiManipFunction);