QTfrontend/game.cpp
branchui-scaling
changeset 15685 d92eeb468dad
parent 15304 c4fd2813b127
parent 15320 3bf780084c86
child 15867 ad43384fbbe9
equal deleted inserted replaced
15304:c4fd2813b127 15685:d92eeb468dad
   505         case 'W':
   505         case 'W':
   506         {
   506         {
   507             // fetch new window resolution via IPC and save it in the settings
   507             // fetch new window resolution via IPC and save it in the settings
   508             int size = msg.size();
   508             int size = msg.size();
   509             QString newResolution = QString().append(msg.mid(2)).left(size - 4);
   509             QString newResolution = QString().append(msg.mid(2)).left(size - 4);
       
   510             bool windowMaximized;
       
   511             if (newResolution.endsWith('M'))
       
   512             {
       
   513                 windowMaximized = true;
       
   514                 newResolution.chop(1);
       
   515             }
       
   516             else
       
   517             {
       
   518                 windowMaximized = false;
       
   519             }
   510             QStringList wh = newResolution.split('x');
   520             QStringList wh = newResolution.split('x');
   511             config->Form->ui.pageOptions->windowWidthEdit->setValue(wh[0].toInt());
   521             config->Form->ui.pageOptions->windowWidthEdit->setValue(wh[0].toInt());
   512             config->Form->ui.pageOptions->windowHeightEdit->setValue(wh[1].toInt());
   522             config->Form->ui.pageOptions->windowHeightEdit->setValue(wh[1].toInt());
       
   523             config->vid_SetMaximized(windowMaximized);
   513             break;
   524             break;
   514         }
   525         }
   515         case '~':
   526         case '~':
   516         {
   527         {
   517             int size = msg.size();
   528             int size = msg.size();
   607     arguments << QString::number(resolutions.first.height());
   618     arguments << QString::number(resolutions.first.height());
   608     arguments << "--width";
   619     arguments << "--width";
   609     arguments << QString::number(resolutions.second.width());
   620     arguments << QString::number(resolutions.second.width());
   610     arguments << "--height";
   621     arguments << "--height";
   611     arguments << QString::number(resolutions.second.height());
   622     arguments << QString::number(resolutions.second.height());
       
   623     if (config->vid_Maximized())
       
   624         arguments << "--maximized";
   612     if (config->zoom() != 100) {
   625     if (config->zoom() != 100) {
   613         arguments << "--zoom";
   626         arguments << "--zoom";
   614         arguments << QString::number(config->zoom());
   627         arguments << QString::number(config->zoom());
   615     }
   628     }
   616     arguments << "--raw-quality";
   629     arguments << "--raw-quality";