Do not do VBlankIntrWait if using the wireless adapter (#3730)
* Do not do VBlankIntrWait if using the wireless adapter Desynchronization can occur otherwise. * Fix formatting Co-authored-by: LOuroboros <lunosouroboros@gmail.com> --------- Co-authored-by: LOuroboros <lunosouroboros@gmail.com>
This commit is contained in:
parent
f419de24d9
commit
21ed70c007
1 changed files with 12 additions and 1 deletions
13
src/main.c
13
src/main.c
|
@ -455,7 +455,18 @@ static void IntrDummy(void)
|
|||
static void WaitForVBlank(void)
|
||||
{
|
||||
gMain.intrCheck &= ~INTR_FLAG_VBLANK;
|
||||
VBlankIntrWait();
|
||||
|
||||
if (gWirelessCommType != 0)
|
||||
{
|
||||
// Desynchronization may occur if wireless adapter is connected
|
||||
// and we call VBlankIntrWait();
|
||||
while (!(gMain.intrCheck & INTR_FLAG_VBLANK))
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
VBlankIntrWait();
|
||||
}
|
||||
}
|
||||
|
||||
void SetTrainerHillVBlankCounter(u32 *counter)
|
||||
|
|
Loading…
Reference in a new issue