DEV9: add back configure GUI

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2020-10-03 19:24:58 +02:00 committed by refractionpcsx2
parent ab22d56735
commit ca8bf22423
8 changed files with 23 additions and 11 deletions

View File

@ -83,7 +83,7 @@ function(COMPILE_GRESOURCES output xml_out)
if (NOT "${CG_ARG_C_PREFIX}" STREQUAL "") if (NOT "${CG_ARG_C_PREFIX}" STREQUAL "")
list(APPEND CG_GENERATE_COMMAND_LINE --c-name "${CG_ARG_C_PREFIX}") list(APPEND CG_GENERATE_COMMAND_LINE --c-name "${CG_ARG_C_PREFIX}")
endif() endif()
set(CG_TARGET_FILE_ENDING "c") set(CG_TARGET_FILE_ENDING "cpp")
elseif ("${CG_ARG_TYPE}" STREQUAL "EMBED_H") elseif ("${CG_ARG_TYPE}" STREQUAL "EMBED_H")
# EMBED_H mode, output includable header file. # EMBED_H mode, output includable header file.
list(APPEND CG_GENERATE_COMMAND_LINE --generate-header) list(APPEND CG_GENERATE_COMMAND_LINE --generate-header)

View File

@ -1,4 +1,4 @@
include(macros/GlibCompileResourcesSupport) include(macros/CompileGResources)
if (openSUSE) if (openSUSE)
@ -313,7 +313,7 @@ set(pcsx2DEV9Sources
DEV9/Linux/Config.cpp DEV9/Linux/Config.cpp
DEV9/Linux/Linux.cpp DEV9/Linux/Linux.cpp
DEV9/Linux/net.cpp DEV9/Linux/net.cpp
#${pcsx2DEV9UISources} ${pcsx2DEV9UISources}
) )
# DEV9 headers # DEV9 headers
@ -323,7 +323,7 @@ set(pcsx2DEV9Headers
DEV9/net.h DEV9/net.h
DEV9/pcap_io.h DEV9/pcap_io.h
DEV9/smap.h DEV9/smap.h
#${pcsx2DEV9UIHeaders} ${pcsx2DEV9UIHeaders}
) )

View File

@ -636,6 +636,7 @@ static flash_info_t devices[] = {
#define FLASH_REGSIZE 0x20 #define FLASH_REGSIZE 0x20
extern void dev9Irq(int cycles); extern void dev9Irq(int cycles);
extern void DEV9configure();
void FLASHinit(); void FLASHinit();
s32 DEV9init(); s32 DEV9init();

View File

@ -27,6 +27,7 @@
#include "pcap.h" #include "pcap.h"
#include "../pcap_io.h" #include "../pcap_io.h"
#include "../net.h" #include "../net.h"
#include "AppCoreThread.h"
static GtkBuilder * builder; static GtkBuilder * builder;
@ -118,9 +119,8 @@ static guint builder_add_from_resource(GtkBuilder *builder
return ret; return ret;
} }
EXPORT_C_(void) void DEV9configure() {
DEV9configure() { ScopedCoreThreadPause paused_core;
gtk_init (NULL, NULL); gtk_init (NULL, NULL);
GError *error = NULL; GError *error = NULL;
builder = gtk_builder_new(); builder = gtk_builder_new();
@ -140,7 +140,7 @@ DEV9configure() {
break; break;
} }
gtk_widget_hide (GTK_WIDGET(dlg)); gtk_widget_hide (GTK_WIDGET(dlg));
paused_core.AllowResume();
} }
NetAdapter* GetNetAdapter() NetAdapter* GetNetAdapter()

View File

@ -24,6 +24,7 @@
#include "..\pcap_io.h" #include "..\pcap_io.h"
#include "..\net.h" #include "..\net.h"
#include "tap.h" #include "tap.h"
#include "AppCoreThread.h"
extern HINSTANCE hInst; extern HINSTANCE hInst;
//HANDLE handleDEV9Thread = NULL; //HANDLE handleDEV9Thread = NULL;
@ -141,13 +142,14 @@ BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) {
return FALSE; return FALSE;
} }
EXPORT_C_(void) void DEV9configure() {
DEV9configure() { ScopedCoreThreadPause paused_core;
DialogBox(hInst, DialogBox(hInst,
MAKEINTRESOURCE(IDD_CONFIG), MAKEINTRESOURCE(IDD_CONFIG),
GetActiveWindow(), GetActiveWindow(),
(DLGPROC)ConfigureDlgProc); (DLGPROC)ConfigureDlgProc);
//SysMessage("Nothing to Configure"); //SysMessage("Nothing to Configure");
paused_core.AllowResume();
} }
EXPORT_C_(void) EXPORT_C_(void)

View File

@ -248,6 +248,7 @@ void MainEmuFrame::ConnectMenus()
Bind(wxEVT_MENU, &MainEmuFrame::Menu_McdSettings_Click, this, MenuId_Config_McdSettings); Bind(wxEVT_MENU, &MainEmuFrame::Menu_McdSettings_Click, this, MenuId_Config_McdSettings);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_SelectPluginsBios_Click, this, MenuId_Config_BIOS); Bind(wxEVT_MENU, &MainEmuFrame::Menu_SelectPluginsBios_Click, this, MenuId_Config_BIOS);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_AudioSettings_Click, this, MenuId_Config_SPU2); Bind(wxEVT_MENU, &MainEmuFrame::Menu_AudioSettings_Click, this, MenuId_Config_SPU2);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_NetworkSettings_Click, this, MenuId_Config_DEV9);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_GSSettings_Click, this, MenuId_Video_CoreSettings); Bind(wxEVT_MENU, &MainEmuFrame::Menu_GSSettings_Click, this, MenuId_Video_CoreSettings);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_WindowSettings_Click, this, MenuId_Video_WindowSettings); Bind(wxEVT_MENU, &MainEmuFrame::Menu_WindowSettings_Click, this, MenuId_Video_WindowSettings);
@ -439,6 +440,7 @@ void MainEmuFrame::CreateConfigMenu()
m_menuConfig.Append(MenuId_Config_McdSettings, _("&Memory Cards...")); m_menuConfig.Append(MenuId_Config_McdSettings, _("&Memory Cards..."));
m_menuConfig.Append(MenuId_Config_BIOS, _("&Plugin/BIOS Selector...")); m_menuConfig.Append(MenuId_Config_BIOS, _("&Plugin/BIOS Selector..."));
m_menuConfig.Append(MenuId_Config_SPU2, _("&Audio Settings...")); m_menuConfig.Append(MenuId_Config_SPU2, _("&Audio Settings..."));
m_menuConfig.Append(MenuId_Config_DEV9, _("&Network and HDD Settings...") );
m_menuConfig.AppendSeparator(); m_menuConfig.AppendSeparator();

View File

@ -191,6 +191,7 @@ protected:
void OnActivate(wxActivateEvent& evt); void OnActivate(wxActivateEvent& evt);
void Menu_SysSettings_Click(wxCommandEvent& event); void Menu_SysSettings_Click(wxCommandEvent& event);
void Menu_NetworkSettings_Click(wxCommandEvent &event);
void Menu_AudioSettings_Click(wxCommandEvent& event); void Menu_AudioSettings_Click(wxCommandEvent& event);
void Menu_McdSettings_Click(wxCommandEvent& event); void Menu_McdSettings_Click(wxCommandEvent& event);
void Menu_WindowSettings_Click(wxCommandEvent& event); void Menu_WindowSettings_Click(wxCommandEvent& event);

View File

@ -21,6 +21,7 @@
#include "GSFrame.h" #include "GSFrame.h"
#include "SPU2/spu2.h" #include "SPU2/spu2.h"
#include "System/SysThreads.h" #include "System/SysThreads.h"
#include "DEV9/DEV9.h"
#include "ConsoleLogger.h" #include "ConsoleLogger.h"
#include "MainFrame.h" #include "MainFrame.h"
@ -58,6 +59,11 @@ void MainEmuFrame::Menu_McdSettings_Click(wxCommandEvent& event)
AppOpenModalDialog<McdConfigDialog>(wxEmptyString, this); AppOpenModalDialog<McdConfigDialog>(wxEmptyString, this);
} }
void MainEmuFrame::Menu_NetworkSettings_Click(wxCommandEvent &event)
{
DEV9configure();
}
void MainEmuFrame::Menu_WindowSettings_Click(wxCommandEvent &event) void MainEmuFrame::Menu_WindowSettings_Click(wxCommandEvent &event)
{ {
wxCommandEvent evt(pxEvt_SetSettingsPage); wxCommandEvent evt(pxEvt_SetSettingsPage);