fix current directory being wrong if launched in weird ways
This commit is contained in:
parent
f48355c096
commit
24e31247af
@ -1,4 +1,5 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "misc.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
@ -50,6 +51,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
AddVectoredExceptionHandler(FALSE, ExceptionLogger);
|
AddVectoredExceptionHandler(FALSE, ExceptionLogger);
|
||||||
SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)Terminate);
|
SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)Terminate);
|
||||||
|
QString exe = GetFullModuleName(GetCurrentProcessId());
|
||||||
|
SetCurrentDirectoryW(exe.left(exe.lastIndexOf("\\")).toStdWString().c_str());
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
w.show();
|
w.show();
|
||||||
|
Loading…
Reference in New Issue
Block a user