diff --git a/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp b/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp index 831a19c846..37d75b17b9 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp @@ -30,17 +30,6 @@ extern Module cellNetCtl; -std::unique_ptr g_sign_in_dialog; - -SignInDialogInstance::SignInDialogInstance() -{ -} - -void SignInDialogInstance::Close() -{ - //state = signInDialogClose; -} - s32 cellNetCtlInit() { cellNetCtl.Warning("cellNetCtlInit()"); @@ -347,22 +336,19 @@ s32 cellNetCtlGetInfo(s32 code, vm::ptr info) s32 cellNetCtlNetStartDialogLoadAsync(vm::ptr param) { - cellNetCtl.Warning("cellNetCtlNetStartDialogLoadAsync(param=*0x%x)", param); + cellNetCtl.Error("cellNetCtlNetStartDialogLoadAsync(param=*0x%x)", param); // TODO: Actually sign into PSN or an emulated network similar to PSN (ESN) // TODO: Properly open the dialog prompt for sign in sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_LOADED, 0); - g_sign_in_dialog->status = CELL_NET_CTL_ERROR_DIALOG_CANCELED; sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0); - return CELL_NET_CTL_ERROR_NOT_CONNECTED; + return CELL_OK; } s32 cellNetCtlNetStartDialogAbortAsync() { - cellNetCtl.Todo("cellNetCtlNetStartDialogAbortAsync()"); - - g_sign_in_dialog->status = CELL_NET_CTL_ERROR_DIALOG_ABORTED; + cellNetCtl.Error("cellNetCtlNetStartDialogAbortAsync()"); return CELL_OK; } @@ -371,7 +357,7 @@ s32 cellNetCtlNetStartDialogUnloadAsync(vm::ptr { cellNetCtl.Warning("cellNetCtlNetStartDialogUnloadAsync(result=*0x%x)", result); - result->result = g_sign_in_dialog->status; + result->result = CELL_NET_CTL_ERROR_DIALOG_CANCELED; sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_UNLOADED, 0); return CELL_OK; diff --git a/rpcs3/Emu/SysCalls/Modules/cellNetCtl.h b/rpcs3/Emu/SysCalls/Modules/cellNetCtl.h index de60bfe1d4..4e08262927 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellNetCtl.h +++ b/rpcs3/Emu/SysCalls/Modules/cellNetCtl.h @@ -261,22 +261,7 @@ struct CellNetCtlNatInfo typedef void(cellNetCtlHandler)(s32 prev_state, s32 new_state, s32 event, s32 error_code, vm::ptr arg); -struct SignInDialogInstance -{ - //std::atomic state; - - s32 status; - - SignInDialogInstance(); - virtual ~SignInDialogInstance() = default; - - virtual void Close(); - - virtual void Create() = 0; - virtual void Destroy() = 0; -}; - -inline static const char* InfoCodeToName(s32 code) +static const char* InfoCodeToName(s32 code) { switch (code) { diff --git a/rpcs3/Gui/SignInDialog.cpp b/rpcs3/Gui/SignInDialog.cpp index 951b75033f..4b629a48fd 100644 --- a/rpcs3/Gui/SignInDialog.cpp +++ b/rpcs3/Gui/SignInDialog.cpp @@ -1,8 +1,5 @@ #include "stdafx_gui.h" -#include "Emu/SysCalls/Modules.h" -#include "Emu/Memory/Memory.h" -#include "Emu/SysCalls/Modules/cellSysutil.h" #include "SignInDialog.h" // TODO: Make this look and work more reasonably @@ -50,26 +47,26 @@ void SignInDialogFrame::Create() b_signin->Bind(wxEVT_BUTTON, [&](wxCommandEvent& event) { - this->status = CELL_OK; + //this->status = CELL_OK; this->m_dialog->Hide(); - this->Close(); - sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0); + //this->Close(); + //sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0); }); b_cancel->Bind(wxEVT_BUTTON, [&](wxCommandEvent& event) { - this->status = CELL_NET_CTL_ERROR_DIALOG_CANCELED; + //this->status = CELL_NET_CTL_ERROR_DIALOG_CANCELED; this->m_dialog->Hide(); - this->Close(); - sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0); + //this->Close(); + //sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0); }); m_dialog->Bind(wxEVT_CLOSE_WINDOW, [&](wxCloseEvent& event) { - this->status = CELL_NET_CTL_ERROR_DIALOG_CANCELED; + //this->status = CELL_NET_CTL_ERROR_DIALOG_CANCELED; this->m_dialog->Hide(); - this->Close(); - sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0); + //this->Close(); + //sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0); }); } diff --git a/rpcs3/Gui/SignInDialog.h b/rpcs3/Gui/SignInDialog.h index f1808188ae..1754b2a43e 100644 --- a/rpcs3/Gui/SignInDialog.h +++ b/rpcs3/Gui/SignInDialog.h @@ -1,12 +1,10 @@ #pragma once -#include "Emu/SysCalls/Modules/cellNetCtl.h" - -class SignInDialogFrame : public SignInDialogInstance +class SignInDialogFrame { std::unique_ptr m_dialog; public: - virtual void Create() override; - virtual void Destroy() override; + virtual void Create(); + virtual void Destroy(); };