From 9b1184e2db620d5b563e63745400f31c4fe1ef1b Mon Sep 17 00:00:00 2001 From: collecting Date: Sat, 4 Oct 2025 04:17:56 +0000 Subject: [PATCH] Edit main.h --- src/citron/main.h | 79 ++++++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/src/citron/main.h b/src/citron/main.h index 30f1f069e..4db6001a7 100644 --- a/src/citron/main.h +++ b/src/citron/main.h @@ -72,59 +72,59 @@ enum class StartGameType { }; namespace Core { -enum class SystemResultStatus : u32; -class System; + enum class SystemResultStatus : u32; + class System; } // namespace Core namespace Core::Frontend { -struct CabinetParameters; -struct ControllerParameters; -struct InlineAppearParameters; -struct InlineTextParameters; -struct KeyboardInitializeParameters; -struct ProfileSelectParameters; + struct CabinetParameters; + struct ControllerParameters; + struct InlineAppearParameters; + struct InlineTextParameters; + struct KeyboardInitializeParameters; + struct ProfileSelectParameters; } // namespace Core::Frontend namespace DiscordRPC { -class DiscordInterface; + class DiscordInterface; } namespace PlayTime { -class PlayTimeManager; + class PlayTimeManager; } namespace FileSys { -class ContentProvider; -class ManualContentProvider; -class VfsFilesystem; + class ContentProvider; + class ManualContentProvider; + class VfsFilesystem; } // namespace FileSys namespace InputCommon { -class InputSubsystem; + class InputSubsystem; } namespace Service::AM { -struct FrontendAppletParameters; -enum class AppletId : u32; + struct FrontendAppletParameters; + enum class AppletId : u32; } // namespace Service::AM namespace Service::AM::Frontend { -enum class SwkbdResult : u32; -enum class SwkbdTextCheckResult : u32; -enum class SwkbdReplyType : u32; -enum class WebExitReason : u32; + enum class SwkbdResult : u32; + enum class SwkbdTextCheckResult : u32; + enum class SwkbdReplyType : u32; + enum class WebExitReason : u32; } // namespace Service::AM::Frontend namespace Service::NFC { -class NfcDevice; + class NfcDevice; } // namespace Service::NFC namespace Service::NFP { -enum class CabinetMode : u8; + enum class CabinetMode : u8; } // namespace Service::NFP namespace Ui { -class MainWindow; + class MainWindow; } enum class EmulatedDirectoryTarget { @@ -133,7 +133,7 @@ enum class EmulatedDirectoryTarget { }; namespace VkDeviceInfo { -class Record; + class Record; } class VolumeButton : public QPushButton { @@ -183,6 +183,13 @@ public: bool DropAction(QDropEvent* event); void AcceptDropEvent(QDropEvent* event); + /** + * This is the new function to provide access to the MultiplayerState. + */ + MultiplayerState* GetMultiplayerState() { + return multiplayer_state; + } + signals: /** @@ -326,16 +333,16 @@ private: std::string CreateTASFramesString( std::array frames) const; -#ifdef __unix__ - void SetupSigInterrupts(); - static void HandleSigInterrupt(int); - void OnSigInterruptNotifierActivated(); - void SetGamemodeEnabled(bool state); -#endif + #ifdef __unix__ + void SetupSigInterrupts(); + static void HandleSigInterrupt(int); + void OnSigInterruptNotifierActivated(); + void SetGamemodeEnabled(bool state); + #endif - Service::AM::FrontendAppletParameters ApplicationAppletParameters(); - Service::AM::FrontendAppletParameters LibraryAppletParameters(u64 program_id, - Service::AM::AppletId applet_id); + Service::AM::FrontendAppletParameters ApplicationAppletParameters(); + Service::AM::FrontendAppletParameters LibraryAppletParameters(u64 program_id, + Service::AM::AppletId applet_id); private slots: void OnStartGame(); @@ -495,7 +502,7 @@ private: */ bool question(QWidget* parent, const QString& title, const QString& text, QMessageBox::StandardButtons buttons = - QMessageBox::StandardButtons(QMessageBox::Yes | QMessageBox::No), + QMessageBox::StandardButtons(QMessageBox::Yes | QMessageBox::No), QMessageBox::StandardButton defaultButton = QMessageBox::NoButton); std::unique_ptr ui; @@ -598,10 +605,10 @@ private: // True if TAS recording dialog is visible bool is_tas_recording_dialog_active{}; -#ifdef __unix__ + #ifdef __unix__ QSocketNotifier* sig_interrupt_notifier; static std::array sig_interrupt_fds; -#endif + #endif protected: void dropEvent(QDropEvent* event) override;