Miscallenious fixes to gl backend and qt frontend (#6834)
* renderer_gl: Make rasterizer normal class member * It doesn't need to be heap allocated anymore * gl_rasterizer: Remove default_texture * It's unused * gl_rasterizer: General cleanup * gl_rasterizer: Lower case lambdas * Match style with review comments from vulkan backend * rasterizer_cache: Prevent memory leak * Since the switch from shared_ptr these surfaces were no longer being destroyed properly. Use our garbage collector for that purpose to destroy it safely for both backends * rasterizer_cache: Make temp copy of old surface * The custom surface would override the memory region of the old region resulting in garbage data, this ensures the custom surface is constructed correctly * citra_qt: Manually create dialog tabs * Allows for custom constructors which is very useful. While at it, global state is now eliminated from configuration * citra_qt: Eliminate global system usage * core: Remove global system usage in memory and HIO * citra_qt: Use qOverload * tests: Run clang format * gl_texture_runtime: Fix surface scaling
This commit is contained in:
@@ -17,9 +17,10 @@
|
||||
#include "citra_qt/util/clickable_label.h"
|
||||
#include "common/logging/log.h"
|
||||
|
||||
MultiplayerState::MultiplayerState(QWidget* parent, QStandardItemModel* game_list_model,
|
||||
QAction* leave_room, QAction* show_room)
|
||||
: QWidget(parent), game_list_model(game_list_model), leave_room(leave_room),
|
||||
MultiplayerState::MultiplayerState(Core::System& system_, QWidget* parent,
|
||||
QStandardItemModel* game_list_model, QAction* leave_room,
|
||||
QAction* show_room)
|
||||
: QWidget(parent), system{system_}, game_list_model(game_list_model), leave_room(leave_room),
|
||||
show_room(show_room) {
|
||||
if (auto member = Network::GetRoomMember().lock()) {
|
||||
// register the network structs to use in slots and signals
|
||||
@@ -203,14 +204,14 @@ static void BringWidgetToFront(QWidget* widget) {
|
||||
|
||||
void MultiplayerState::OnViewLobby() {
|
||||
if (lobby == nullptr) {
|
||||
lobby = new Lobby(this, game_list_model, announce_multiplayer_session);
|
||||
lobby = new Lobby(system, this, game_list_model, announce_multiplayer_session);
|
||||
}
|
||||
BringWidgetToFront(lobby);
|
||||
}
|
||||
|
||||
void MultiplayerState::OnCreateRoom() {
|
||||
if (host_room == nullptr) {
|
||||
host_room = new HostRoomWindow(this, game_list_model, announce_multiplayer_session);
|
||||
host_room = new HostRoomWindow(system, this, game_list_model, announce_multiplayer_session);
|
||||
}
|
||||
BringWidgetToFront(host_room);
|
||||
}
|
||||
@@ -274,7 +275,7 @@ void MultiplayerState::OnOpenNetworkRoom() {
|
||||
|
||||
void MultiplayerState::OnDirectConnectToRoom() {
|
||||
if (direct_connect == nullptr) {
|
||||
direct_connect = new DirectConnectWindow(this);
|
||||
direct_connect = new DirectConnectWindow(system, this);
|
||||
}
|
||||
BringWidgetToFront(direct_connect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user