do not allow lua scripts to enable ZoomNoResize if the commandline forced opengl off

This commit is contained in:
Tim Felgentreff 2020-04-12 11:57:48 +02:00
parent 8627ad20ad
commit f83fc7857d

View file

@ -253,7 +253,11 @@ static int CclSetZoomNoResize(lua_State *l)
{
#if defined(USE_OPENGL) || defined(USE_GLES)
if (CclInConfigFile) {
// May have been set from the command line
// Did the commandline force OpenGL off?
if (ForceUseOpenGL && UseOpenGL == 0) {
return 0;
}
// Did the commandline already force ZoomNoResize on?
if (!(ForceUseOpenGL && ZoomNoResize)) {
const int args = lua_gettop(l);
int originalWidth = 640;