From a023657348051cbc7c8ea29e3b37f3e2e3fd16d8 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Sat, 29 May 2021 10:43:53 -0500 Subject: Partial: Add mount list to options dialog --- src/aoapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/aoapplication.cpp') diff --git a/src/aoapplication.cpp b/src/aoapplication.cpp index 00175e56..dd75b0a7 100644 --- a/src/aoapplication.cpp +++ b/src/aoapplication.cpp @@ -18,7 +18,7 @@ AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv) discord = new AttorneyOnline::Discord(); QObject::connect(net_manager, SIGNAL(ms_connect_finished(bool, bool)), SLOT(ms_connect_finished(bool, bool))); - qApp->setStyleSheet("QFrame {background-color:transparent;} QAbstractItemView {background-color: transparent; color: black;}; QLineEdit {background-color:transparent;}"); + // qApp->setStyleSheet("QFrame {background-color:transparent;} QAbstractItemView {background-color: transparent; color: black;}; QLineEdit {background-color:transparent;}"); } AOApplication::~AOApplication() -- cgit From d27501313cae78b838c1e738ebfaeae4740a23b4 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Sat, 5 Jun 2021 14:58:40 -0500 Subject: Finish mounting feature To pull this one off, a new class called VPath was created that denotes "virtual" paths that can exist anywhere among the list of mount points. It is functionally identical to QString, except that implicit conversion between QString and VPath is not allowed. This makes it easy to spot errors in path resolution at compile time, since get_real_path must be called to resolve a VPath into an absolute path that can be passed into a Qt function as a QString. Other functions, such as the get_*_suffix functions, also return an absolute path QString for convenience. As for the rest of the functions that return a VPath, you will need to call get_real_path yourself. Finally, a path resolution cache was added to try to avoid blowing up what is already a massive lookup cost for assets. The cache is invalidated when the mount path list is changed. Currently, this cache isn't bounded. Might need to write an LRU cache if issues arise. --- src/aoapplication.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/aoapplication.cpp') diff --git a/src/aoapplication.cpp b/src/aoapplication.cpp index dd75b0a7..355db037 100644 --- a/src/aoapplication.cpp +++ b/src/aoapplication.cpp @@ -19,6 +19,7 @@ AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv) QObject::connect(net_manager, SIGNAL(ms_connect_finished(bool, bool)), SLOT(ms_connect_finished(bool, bool))); // qApp->setStyleSheet("QFrame {background-color:transparent;} QAbstractItemView {background-color: transparent; color: black;}; QLineEdit {background-color:transparent;}"); + asset_lookup_cache.reserve(2048); } AOApplication::~AOApplication() -- cgit From 2cb7ca7895e72f603ac2283da656377217d281c6 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Tue, 8 Jun 2021 22:50:32 -0500 Subject: Move global stylesheet to lobby and courtroom This way, it will not affect the options dialog. --- src/aoapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/aoapplication.cpp') diff --git a/src/aoapplication.cpp b/src/aoapplication.cpp index 355db037..1ae90f8c 100644 --- a/src/aoapplication.cpp +++ b/src/aoapplication.cpp @@ -18,7 +18,7 @@ AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv) discord = new AttorneyOnline::Discord(); QObject::connect(net_manager, SIGNAL(ms_connect_finished(bool, bool)), SLOT(ms_connect_finished(bool, bool))); - // qApp->setStyleSheet("QFrame {background-color:transparent;} QAbstractItemView {background-color: transparent; color: black;}; QLineEdit {background-color:transparent;}"); + asset_lookup_cache.reserve(2048); } -- cgit From 5190490a07f929aef3ee0198f5bce251ff28dbea Mon Sep 17 00:00:00 2001 From: Rose Witchaven <32779090+in1tiate@users.noreply.github.com> Date: Fri, 18 Jun 2021 23:58:46 -0500 Subject: Set BASS_CONFIG_DEV_DEFAULT to 1 to enable automatic reinitialization of the default device when it is lost (#564) fixes #561 --- src/aoapplication.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/aoapplication.cpp') diff --git a/src/aoapplication.cpp b/src/aoapplication.cpp index 74857593..e71f4c8a 100644 --- a/src/aoapplication.cpp +++ b/src/aoapplication.cpp @@ -194,6 +194,7 @@ void AOApplication::call_announce_menu(Courtroom *court) } // Callback for when BASS device is lost +// Only actually used for music syncs void CALLBACK AOApplication::BASSreset(HSTREAM handle, DWORD channel, DWORD data, void *user) { @@ -213,6 +214,7 @@ void AOApplication::doBASSreset() void AOApplication::initBASS() { + BASS_SetConfig(BASS_CONFIG_DEV_DEFAULT, 1); BASS_Free(); // Change the default audio output device to be the one the user has given // in his config.ini file for now. -- cgit From 15f0ee38383fef3c140752345b4aa57628ad2e53 Mon Sep 17 00:00:00 2001 From: in1tiate Date: Thu, 29 Jul 2021 08:54:34 -0500 Subject: swap out custom UNUSED macro for Q_UNUSED --- src/aoapplication.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/aoapplication.cpp') diff --git a/src/aoapplication.cpp b/src/aoapplication.cpp index e71f4c8a..74dc6ed1 100644 --- a/src/aoapplication.cpp +++ b/src/aoapplication.cpp @@ -198,10 +198,10 @@ void AOApplication::call_announce_menu(Courtroom *court) void CALLBACK AOApplication::BASSreset(HSTREAM handle, DWORD channel, DWORD data, void *user) { - UNUSED(handle); - UNUSED(channel); - UNUSED(data); - UNUSED(user); + Q_UNUSED(handle); + Q_UNUSED(channel); + Q_UNUSED(data); + Q_UNUSED(user); doBASSreset(); } -- cgit From bc49b3e976e4df01e983a9c9daea28287b9bee75 Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Sat, 11 Dec 2021 00:28:00 +0100 Subject: Update slots/signals to Qt5 connection style and eliminate some clazy warnings --- src/aoapplication.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/aoapplication.cpp') diff --git a/src/aoapplication.cpp b/src/aoapplication.cpp index 74dc6ed1..4a5ed52a 100644 --- a/src/aoapplication.cpp +++ b/src/aoapplication.cpp @@ -16,8 +16,8 @@ AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv) net_manager = new NetworkManager(this); discord = new AttorneyOnline::Discord(); - QObject::connect(net_manager, SIGNAL(ms_connect_finished(bool, bool)), - SLOT(ms_connect_finished(bool, bool))); + connect(net_manager, &NetworkManager::ms_connect_finished, + this, &AOApplication::ms_connect_finished); asset_lookup_cache.reserve(2048); } -- cgit