preliminary lid recording

This commit is contained in:
p989 2009-06-16 19:39:21 +00:00
parent e91c8f89c1
commit eb05c12759
3 changed files with 16 additions and 5 deletions

View File

@ -2477,8 +2477,8 @@ void NDS_setPadFromMovie(u16 pad)
FIX(pad,3), //X
FIX(pad,2),
FIX(pad,1),
FIX(pad,0),
FIX(pad,13)
FIX(pad,13),
FIX(pad,0)
);
#undef FIX
}
@ -2637,7 +2637,8 @@ void NDS_setPad(bool R,bool L,bool D,bool U,bool T,bool S,bool B,bool A,bool Y,b
(FIX(y)<<4)|
(FIX(x)<<3)|
(FIX(w)<<2)|
(FIX(e)<<1);
(FIX(e)<<1)|
(FIX(f)<<0);
// TODO: low power IRQ
}

View File

@ -554,6 +554,11 @@ static void openRecordingMovie(const char* fname)
else
MicButtonPressed=0;
if(mr->command_lid())
mr->pad |= (1 << 0);
else
mr->pad |= (0 << 0);
NDS_setPadFromMovie(mr->pad);
NDS_setTouchFromMovie();
}
@ -580,11 +585,15 @@ static void openRecordingMovie(const char* fname)
{
MovieRecord mr;
mr.commands = 0;
if(MicButtonPressed == 1)
mr.commands=1;
else
mr.commands = 0;
mr.pad = nds.pad;
if(nds.pad & (1<<0) == 1)
mr.commands=4;
if(nds.isTouch) {
mr.touch.x = nds.touchX >> 4;
mr.touch.y = nds.touchY >> 4;

View File

@ -61,6 +61,7 @@ public:
uint8 commands;
bool command_reset() { return (commands&MOVIECMD_RESET)!=0; }
bool command_microphone() { return (commands&1)!=0; }
bool command_lid() { return (commands&4)!=0; }
void toggleBit(int bit)
{