Skip to content
Permalink
Browse files

riscos: Fix returning from full-screen to 16M colour modes

  • Loading branch information
ccawley2011 committed Aug 17, 2018
1 parent 52d49a8 commit f7599fbb869c3f70c3255a392626fcb4e86e96a8
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/video/riscos/SDL_riscostask.c
@@ -72,10 +72,14 @@ static void dump_mode()
int blockSize = 0;
int *storeBlock = (int *)stored_mode;

while(blockSize < 5 || storeBlock[blockSize] != -1)
while(blockSize < 5)
{
fprintf(stderr, " %d\n", storeBlock[blockSize++]);
}
while(storeBlock[blockSize] != -1)
{
fprintf(stderr, " %d %d\n", storeBlock[blockSize++], storeBlock[blockSize++]);
}
}
}
#endif
@@ -285,7 +289,8 @@ void RISCOS_StoreWimpMode()
int *storeBlock;
int j;

while(blockSize < 5 || retBlock[blockSize] != -1) blockSize++;
while(blockSize < 5) blockSize++;
while(retBlock[blockSize] != -1) blockSize+=2;
blockSize++;
storeBlock = (int *)SDL_malloc(blockSize * sizeof(int));
retBlock = (int *)regs.r[1];
@@ -294,7 +299,7 @@ void RISCOS_StoreWimpMode()

stored_mode = (int)storeBlock;
}
#if DUMP_MODE
#ifdef DUMP_MODE
fprintf(stderr, "Stored "); dump_mode();
#endif
}
@@ -312,7 +317,7 @@ void RISCOS_RestoreWimpMode()
/* Only need to restore if we are in full screen mode */
if (stored_mode == -1) return;

#if DUMP_MODE
#ifdef DUMP_MODE
fprintf(stderr, "Restored"); dump_mode();
#endif

0 comments on commit f7599fb

Please sign in to comment.