mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-04 05:55:31 +02:00
Fix shState segfault
This commit is contained in:
parent
58a3c36a10
commit
0d54b47040
1 changed files with 4 additions and 5 deletions
|
@ -834,7 +834,10 @@ struct GraphicsPrivate {
|
|||
IntruList<Disposable> dispList;
|
||||
|
||||
GraphicsPrivate(RGSSThreadData *rtData)
|
||||
: scRes(DEF_SCREEN_W, DEF_SCREEN_H), scResLores(scRes), scSize(scRes),
|
||||
: scResLores(DEF_SCREEN_W, DEF_SCREEN_H),
|
||||
scRes(rtData->config.enableHires ? (int)lround(rtData->config.framebufferScalingFactor * DEF_SCREEN_W) : DEF_SCREEN_W,
|
||||
rtData->config.enableHires ? (int)lround(rtData->config.framebufferScalingFactor * DEF_SCREEN_H) : DEF_SCREEN_H),
|
||||
scSize(scRes),
|
||||
winSize(rtData->config.defScreenW, rtData->config.defScreenH),
|
||||
screen(scRes.x, scRes.y), threadData(rtData),
|
||||
glCtx(SDL_GL_GetCurrentContext()), multithreadedMode(true),
|
||||
|
@ -1166,10 +1169,6 @@ Graphics::Graphics(RGSSThreadData *data) {
|
|||
} else if (data->config.fixedFramerate < 0) {
|
||||
p->fpsLimiter.disabled = true;
|
||||
}
|
||||
|
||||
if (shState->config().enableHires) {
|
||||
resizeScreen(p->scResLores.x, p->scResLores.y);
|
||||
}
|
||||
}
|
||||
|
||||
Graphics::~Graphics() { delete p; }
|
||||
|
|
Loading…
Add table
Reference in a new issue