From f1e8bbe2de41394a5b270112b110085abb7976e9 Mon Sep 17 00:00:00 2001 From: Jonathan Young Date: Thu, 8 May 2014 21:14:30 +1000 Subject: [PATCH 1/5] Fixed uninitialized memory and one small typo. --- mainwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 748a203..cf2f358 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -3,7 +3,8 @@ ioLaunch::ioLaunch(QWidget *parent) : QMainWindow(parent), - ui(new Ui::ioLaunch) + ui(new Ui::ioLaunch), + ioWidth(0), ioHeight(0), ioWedited(false), ioHedited(false) { ui->setupUi(this); resOption = ""; @@ -116,7 +117,7 @@ void ioLaunch::on_cbResolution_currentIndexChanged(int index) } case 8: { - resOption = " +set r_customwidth 1024 +set r_customheight 3768"; + resOption = " +set r_customwidth 1024 +set r_customheight 768"; break; } case 9: From bad8358d460938bd02eaaa89d9ecb731e3dea870 Mon Sep 17 00:00:00 2001 From: Jonathan Young Date: Thu, 8 May 2014 21:22:51 +1000 Subject: [PATCH 2/5] Windows: enclose the ioq3 path in quotes instead of escaping individual spaces. --- mainwindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index cf2f358..c7bdeaa 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -25,8 +25,7 @@ void ioLaunch::on_btnLaunch_clicked() msg.setText("Please select your Quake3 directory"); msg.exec(); QString path = QFileDialog::getExistingDirectory (this, tr("Directory"), directory.path()); - path.replace(" ", "\" \""); - ioq3 = path + "\\ioquake3.x86.exe +set r_mode -1"; + ioq3 = QString("\"") + path + QDir::separator() + "ioquake3.x86.exe\" +set r_mode -1"; } #elif defined Q_OS_MAC ioq3 = "open -a ioquake3 --args +set r_mode -1"; From 189d9b88ca90a83a46b5cc782c10da5177b3a8a6 Mon Sep 17 00:00:00 2001 From: Jonathan Young Date: Thu, 8 May 2014 21:37:32 +1000 Subject: [PATCH 3/5] Start the ioq3 process detached, so you can close the launcher while ioq3 is running. --- mainwindow.cpp | 4 ++-- mainwindow.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index c7bdeaa..a372dc8 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,3 +1,4 @@ +#include #include "mainwindow.h" #include "ui_mainwindow.h" @@ -51,8 +52,7 @@ void ioLaunch::on_btnLaunch_clicked() screenOption = ""; } - myProcess.start(ioq3+resOption+screenOption); - if(!myProcess.waitForStarted()) + if(!QProcess::startDetached(ioq3+resOption+screenOption)) { ioq3Failed.setText("ioquake3 failed to start!\nIs it installed?\n"); ioq3Failed.exec(); diff --git a/mainwindow.h b/mainwindow.h index 6f550f0..5d1bc8a 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -42,7 +41,6 @@ private slots: private: Ui::ioLaunch *ui; - QProcess myProcess; QString ioq3; QString resOption; QString screenOption; From 28cb81fccdfc2a718a0911f52dabd72515235124 Mon Sep 17 00:00:00 2001 From: Jonathan Young Date: Thu, 8 May 2014 21:38:50 +1000 Subject: [PATCH 4/5] Silence unused arg warning. --- mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index a372dc8..17ccca3 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -59,7 +59,7 @@ void ioLaunch::on_btnLaunch_clicked() } } -void ioLaunch::on_cbResolution_highlighted(int index) +void ioLaunch::on_cbResolution_highlighted(int /*index*/) { ioWedited = false; ioHedited = false; From 0e249476feefa146b22c2abcc9a29ad2fc038555 Mon Sep 17 00:00:00 2001 From: Jonathan Young Date: Thu, 8 May 2014 21:49:31 +1000 Subject: [PATCH 5/5] Use the iol icon for the windows exe file. --- iolico.ico | Bin 0 -> 5430 bytes launch.pro | 2 ++ launch.rc | 1 + 3 files changed, 3 insertions(+) create mode 100644 iolico.ico create mode 100644 launch.rc diff --git a/iolico.ico b/iolico.ico new file mode 100644 index 0000000000000000000000000000000000000000..e84f90640bb7ec25480d6b2733f8897b6b4a788e GIT binary patch literal 5430 zcmcIoU2GIp7`@vwx3Hb>I=;c%V%mV|C;*NB;H; zkx8I#LT>=R2WEhA;2dz+18w>kBd38m0=a2ZCzirz0}p`=V5BWQI%KXF1a0YaW8~N} zhq(!f*U;Vpz67_~w)AQ{p_S2=ec1HLJ~=LzIpTw>acUd`eg=3CUEscsb`LP@VUOqI zn36;8G3H`im%+XOq#o8f)H(v}0!C18jRbAiclf)u6Xc|T3o_R=^CDVs{p|1TbDz~# z*hiV$CuULL?2`1kn81$eoGgpI*bUO*SfT&Jk=dAklF-8u#VLxz$ozyvg2G9rG^FZ71 zVqvMXeBcV()R&{hIO$2xp2bm}T%{1%s1R35h3M%KA{B8_RgV3`!xu}0=&g1^9&?E4 zn7hx^L#!3xek6a`c!K+k<2YhI=zH&liov9|il99ojbd_6##<_}u6APFE&}%fHHTD7 z-$ioBEk?T#cO?Gu66|RoLHlkLVgSyxsuVA0(!Pss)V>Q*PeA@IeCOQAU9%vbx z6~9n>IZH}>^Lf8N)o z{%ks_y+zRW$H-+4bEO8flrC%dxymLFv7E=7QtJk1QZs$jQ(T;J`{0}OxSZ>-wS6j1 zuFOF$ecn2r^7uK{Qe4&I3~7C=XX%F?`vdhemd5u8*8CN7y3+-1-C>M*!TR*!d_1J| zSxf1w*3+Tx%o%IdQ_3H_f5gXt$$@v9o>3gy^f5+XSbb_D?w!3xr^;0=)@=%L*8g4k zq*mbm5&sMK@~xjkn?A;5PGI~Mm)d~CTFR$dtUJC>F*dAxY(wt<8hCf`43{b%ZTf&~ zGAB=cYO@Awsa(}&Ok+P|cqcfhd~A7!@ESOm*$3x+OL@G(YC-uelnjeOSf*Px9#q|2D8 zCxbD(JGKYc%z$acaNnO0wEa1DvguV^!&m+@f^n=vzIQpS<>%AB+}gSbYv6hY-wDCk zlj>8OHCQW56ZiQst}hc7qYrcZ9QVaSASZ7=zq3#yUwp`1{WR+TITF{FhjCb!<5vje zgym9`+N=>4S3b=3&oZX=zUuqih191ewf%ZwHs=}kavO7GSuj4|`qZLka1ICcRbQTM zc$ZOq)y}s*-;080q|(gS@(e}ZEB^R=>Qf_lcKbC8+1z^uI<)5$r`Y<;UFbVFYo}78 zgl#ePRgSv$g|z&>;+cWqc