-pos=<x>,<y> -> correct error when not present

This commit is contained in:
joachim 2023-03-02 14:30:12 +01:00 committed by trzy
parent c97e3acce7
commit c301a574ed

View file

@ -1087,8 +1087,7 @@ int Supermodel(const Game &game, ROMSet *rom_set, IEmulator *Model3, CInputs *In
SDL_SetWindowTitle(s_window, baseTitleStr); SDL_SetWindowTitle(s_window, baseTitleStr);
SDL_SetWindowSize(s_window, totalXRes, totalYRes); SDL_SetWindowSize(s_window, totalXRes, totalYRes);
if ( s_runtime_config["Xpos"].ValueAs<std::string>() != "NA" && if ( !s_runtime_config["Xpos"].Empty() && !s_runtime_config["Xpos"].Empty())
s_runtime_config["Ypos"].ValueAs<std::string>() != "NA" )
SDL_SetWindowPosition(s_window, s_runtime_config["Xpos"].ValueAs<unsigned>(), s_runtime_config["Ypos"].ValueAs<unsigned>()); SDL_SetWindowPosition(s_window, s_runtime_config["Xpos"].ValueAs<unsigned>(), s_runtime_config["Ypos"].ValueAs<unsigned>());
else else
SDL_SetWindowPosition(s_window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); SDL_SetWindowPosition(s_window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);