lay base for DSi-mode TSC

This commit is contained in:
Arisotura
2019-08-04 11:44:36 +02:00
parent f7f4ff0519
commit a6a9f74acc
7 changed files with 186 additions and 19 deletions

View File

@ -32,6 +32,7 @@
#include "Platform.h"
#include "DSi.h"
#include "DSi_SPI_TSC.h"
namespace NDS
@ -519,6 +520,7 @@ void Reset()
Wifi::Reset();
DSi::Reset();
KeyInput &= ~(1 << (16+6)); // TODO
}
void Stop()
@ -932,24 +934,30 @@ void CancelEvent(u32 id)
}
void PressKey(u32 key)
{
KeyInput &= ~(1 << key);
}
void ReleaseKey(u32 key)
{
KeyInput |= (1 << key);
}
void TouchScreen(u16 x, u16 y)
{
SPI_TSC::SetTouchCoords(x, y);
if (true) // TODO!!
{
DSi_SPI_TSC::SetTouchCoords(x, y);
}
else
{
SPI_TSC::SetTouchCoords(x, y);
KeyInput &= ~(1 << (16+6));
}
}
void ReleaseScreen()
{
SPI_TSC::SetTouchCoords(0x000, 0xFFF);
if (true) // TODO!!
{
DSi_SPI_TSC::SetTouchCoords(0x000, 0xFFF);
}
else
{
SPI_TSC::SetTouchCoords(0x000, 0xFFF);
KeyInput |= (1 << (16+6));
}
}