mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-13 07:21:31 +00:00
Fix wrong ext texture use after vid_restart windowed to/from fullscreen
Patch from Andrei Drexler. Reference issue: https://github.com/sezero/quakespasm/issues/28.
This commit is contained in:
parent
f8132afd0f
commit
ec57aa9731
1 changed files with 3 additions and 2 deletions
|
@ -462,7 +462,7 @@ static void Mod_LoadTextures (lump_t *l)
|
||||||
int nummiptex;
|
int nummiptex;
|
||||||
src_offset_t offset;
|
src_offset_t offset;
|
||||||
int mark, fwidth, fheight;
|
int mark, fwidth, fheight;
|
||||||
char filename[MAX_OSPATH], filename2[MAX_OSPATH], mapname[MAX_OSPATH];
|
char filename[MAX_OSPATH], mapname[MAX_OSPATH];
|
||||||
byte *data;
|
byte *data;
|
||||||
extern byte *hunk_base;
|
extern byte *hunk_base;
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
@ -607,6 +607,7 @@ static void Mod_LoadTextures (lump_t *l)
|
||||||
//now load whatever we found
|
//now load whatever we found
|
||||||
if (data) //load external image
|
if (data) //load external image
|
||||||
{
|
{
|
||||||
|
char filename2[MAX_OSPATH];
|
||||||
tx->gltexture = TexMgr_LoadImage (loadmodel, filename, fwidth, fheight,
|
tx->gltexture = TexMgr_LoadImage (loadmodel, filename, fwidth, fheight,
|
||||||
SRC_RGBA, data, filename, 0, TEXPREF_MIPMAP | extraflags );
|
SRC_RGBA, data, filename, 0, TEXPREF_MIPMAP | extraflags );
|
||||||
|
|
||||||
|
@ -622,7 +623,7 @@ static void Mod_LoadTextures (lump_t *l)
|
||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
tx->fullbright = TexMgr_LoadImage (loadmodel, filename2, fwidth, fheight,
|
tx->fullbright = TexMgr_LoadImage (loadmodel, filename2, fwidth, fheight,
|
||||||
SRC_RGBA, data, filename, 0, TEXPREF_MIPMAP | extraflags );
|
SRC_RGBA, data, filename2, 0, TEXPREF_MIPMAP | extraflags );
|
||||||
}
|
}
|
||||||
else //use the texture from the bsp file
|
else //use the texture from the bsp file
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue