mirror of
https://github.com/Llennpie/Saturn.git
synced 2025-01-23 08:02:02 -05:00
Merge pull request #24 from integerbang/legacy
Fix dangling pointer references in `saturn_bind_texture`
This commit is contained in:
commit
90ad49788e
1 changed files with 4 additions and 10 deletions
|
@ -182,19 +182,13 @@ const void* saturn_bind_texture(const void* input) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show_vmario_emblem) {
|
if (show_vmario_emblem) {
|
||||||
if (texName == "actors/mario/no_m.rgba16") {
|
if (texName == "actors/mario/no_m.rgba16")
|
||||||
outputTexture = string("actors/mario/mario_logo.rgba16").c_str();
|
return "actors/mario/mario_logo.rgba16";
|
||||||
const void* output = static_cast<const void*>(outputTexture);
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gCurrLevelNum == LEVEL_SA && use_color_background) {
|
if (gCurrLevelNum == LEVEL_SA && use_color_background) {
|
||||||
if (texName.find("textures/skybox_tiles/") != string::npos) {
|
if (texName.find("textures/skybox_tiles/") != string::npos)
|
||||||
outputTexture = string("textures/saturn/white.rgba16").c_str();
|
return "textures/saturn/white.rgba16";
|
||||||
const void* output = static_cast<const void*>(outputTexture);
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return input;
|
return input;
|
||||||
|
|
Loading…
Reference in a new issue