mirror of
https://github.com/sheumann/VNCviewGS.git
synced 2025-02-18 16:30:31 +00:00
Don't duplicatively regenerate color table entries.
The logic for making sure the color table was complete before connecting was slightly broken due to wraparound, so it would cause all entries to be generated, re-generating any that already had been. This fixes it, which should make the initial connection process slightly faster on slow systems.
This commit is contained in:
parent
1b4d47b690
commit
d1b2e10489
@ -82,12 +82,12 @@ const unsigned char coltab640[] = {
|
||||
/* 11111 */ 0xAA,0xAA,0xAA,0xAA,0xFF,0xFF,0xFF,0xFF
|
||||
};
|
||||
|
||||
/* iters = number of iterations to do (must be > 0) */
|
||||
/* iters = number of iterations to do (0 means run to completion) */
|
||||
BOOLEAN MakeBigColorTables (unsigned int iters)
|
||||
{
|
||||
static unsigned int i = 0;
|
||||
unsigned int iMax = i + iters;
|
||||
if (iMax < i) /* Deal with wraparound */
|
||||
if (iMax <= i) /* Deal with wraparound */
|
||||
iMax = 0;
|
||||
|
||||
/* The addressing scheme here depends on the IIgs's little-endianness */
|
||||
|
@ -84,7 +84,7 @@ void DoConnect (void) {
|
||||
|
||||
if (colorTablesComplete == FALSE) {
|
||||
DisplayConnectStatus("\pGenerating color tables...", FALSE);
|
||||
MakeBigColorTables(65536);
|
||||
MakeBigColorTables(0);
|
||||
colorTablesComplete = TRUE;
|
||||
CloseConnectStatusWindow();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user