Fix loading renderer DLLs on Windows x86
After 'Fix floating point precision loss in renderer', Windows x86 client won't load the renderer DLLs. The problem is a 64 bit modulus. I couldn't find any reports of this online. However, client with built-in renderer worked with the 64 bit modulus. Only tested with mingw-w64.
This commit is contained in:
parent
c2ce1c2f51
commit
6f0736ce9a
2 changed files with 12 additions and 2 deletions
|
@ -239,7 +239,12 @@ static void R_BindAnimatedImage( textureBundle_t *bundle ) {
|
||||||
if ( index < 0 ) {
|
if ( index < 0 ) {
|
||||||
index = 0; // may happen with shader time offsets
|
index = 0; // may happen with shader time offsets
|
||||||
}
|
}
|
||||||
index %= bundle->numImageAnimations;
|
|
||||||
|
// Windows x86 doesn't load renderer DLL with 64 bit modulus
|
||||||
|
//index %= bundle->numImageAnimations;
|
||||||
|
while ( index >= bundle->numImageAnimations ) {
|
||||||
|
index -= bundle->numImageAnimations;
|
||||||
|
}
|
||||||
|
|
||||||
GL_Bind( bundle->image[ index ] );
|
GL_Bind( bundle->image[ index ] );
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,12 @@ static void R_BindAnimatedImageToTMU( textureBundle_t *bundle, int tmu ) {
|
||||||
if ( index < 0 ) {
|
if ( index < 0 ) {
|
||||||
index = 0; // may happen with shader time offsets
|
index = 0; // may happen with shader time offsets
|
||||||
}
|
}
|
||||||
index %= bundle->numImageAnimations;
|
|
||||||
|
// Windows x86 doesn't load renderer DLL with 64 bit modulus
|
||||||
|
//index %= bundle->numImageAnimations;
|
||||||
|
while ( index >= bundle->numImageAnimations ) {
|
||||||
|
index -= bundle->numImageAnimations;
|
||||||
|
}
|
||||||
|
|
||||||
GL_BindToTMU( bundle->image[ index ], tmu );
|
GL_BindToTMU( bundle->image[ index ], tmu );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue