oops i failed to checkin everything

This commit is contained in:
zeromus 2009-04-02 17:01:17 +00:00
parent cf92e9fcd6
commit 8c7c89f036
2 changed files with 27 additions and 0 deletions

View File

@ -49,6 +49,7 @@
TCommonSettings CommonSettings;
static Driver _stub_driver;
Driver* driver = &_stub_driver;
std::string InputDisplayString;
static BOOL LidClosed = FALSE;
static u8 countLid = 0;
@ -2210,6 +2211,27 @@ u32 NDS_exec(s32 nb)
return nds.cycles;
}
std::string MakeInputDisplayString(u16 pad, const std::string* Buttons, int count) {
std::string s;
for (int x = 0; x < count; x++) {
if (pad & (1 << x))
s.append(Buttons[x].size(), ' ');
else
s += Buttons[x];
}
return s;
}
std::string MakeInputDisplayString(u16 pad, u16 padExt) {
const std::string Buttons[] = {"A", "B", "Sl", "St", "R", "L", "U", "D", "Rs", "Ls"};
const std::string Ext[] = {"X", "Y"};
std::string s = MakeInputDisplayString(pad, Ext, ARRAYSIZE(Ext));
s += MakeInputDisplayString(padExt, Buttons, ARRAYSIZE(Buttons));
return s;
}
void NDS_setPadFromMovie(u16 pad)
{
#define FIX(b,n) (((pad>>n)&1)!=0)
@ -2296,6 +2318,8 @@ void NDS_setPad(bool R,bool L,bool D,bool U,bool T,bool S,bool B,bool A,bool Y,b
((u16 *)MMU.ARM7_REG)[0x136>>1] = (u16)padExt;
InputDisplayString=MakeInputDisplayString(padExt, pad);
//put into the format we want for the movie system
//RLDUTSBAYXWEGF
#undef FIX

View File

@ -32,6 +32,8 @@
#include "mem.h"
#include "wifi.h"
#include <string>
extern volatile BOOL execute;
extern BOOL click;
extern char pathToROM[MAX_PATH];
@ -326,6 +328,7 @@ public:
};
extern Driver* driver;
extern std::string InputDisplayString;
#endif