NO_LINK wx build fixes

This commit is contained in:
skidau 2015-05-05 13:37:56 +00:00
parent e7fe42c555
commit c673cceaf7
6 changed files with 22 additions and 15 deletions

View File

@ -1,6 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <locale> #include <locale>
#include <malloc.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "GBA.h" #include "GBA.h"

View File

@ -177,7 +177,7 @@ if(APPLE)
SET(CMAKE_EXECUTABLE_SUFFIX .app) SET(CMAKE_EXECUTABLE_SUFFIX .app)
# this should set ROM file types correctly # this should set ROM file types correctly
SET_PROPERTY(TARGET wxvbam APPEND PROPERTY MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/wxplist.in) SET_PROPERTY(TARGET wxvbam APPEND PROPERTY MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/wxplist.in)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/icons/wxvbam.icns) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/icons/wxvbam.icns DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
SET(MACOSX_BUNDLE_ICON_FILE wxvbam.icns) SET(MACOSX_BUNDLE_ICON_FILE wxvbam.icns)
SET_SOURCE_FILES_PROPERTIES(wxvbam.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) SET_SOURCE_FILES_PROPERTIES(wxvbam.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
endif(APPLE) endif(APPLE)

View File

@ -2356,8 +2356,6 @@ EVT_HANDLER(VSync, "Wait for vertical sync")
update_opts(); update_opts();
} }
#ifndef NO_LINK
void MainFrame::EnableNetworkMenu() void MainFrame::EnableNetworkMenu()
{ {
cmd_enable &= ~CMDEN_LINK_ANY; cmd_enable &= ~CMDEN_LINK_ANY;
@ -2388,6 +2386,7 @@ void SetLinkTypeMenu(const char *type, int value)
EVT_HANDLER_MASK(LanLink, "Start Network link", CMDEN_LINK_ANY) EVT_HANDLER_MASK(LanLink, "Start Network link", CMDEN_LINK_ANY)
{ {
#ifndef NO_LINK
LinkMode mode = GetLinkMode(); LinkMode mode = GetLinkMode();
if (mode != LINK_DISCONNECTED) { if (mode != LINK_DISCONNECTED) {
@ -2401,9 +2400,11 @@ EVT_HANDLER_MASK(LanLink, "Start Network link", CMDEN_LINK_ANY)
wxLogError(_("Network is not supported in local mode.")); wxLogError(_("Network is not supported in local mode."));
return; return;
} }
wxDialog *dlg = GetXRCDialog("NetLink"); wxDialog *dlg = GetXRCDialog("NetLink");
ShowModal(dlg); ShowModal(dlg);
panel->SetFrameTitle(); panel->SetFrameTitle();
#endif
} }
EVT_HANDLER(LinkType0Nothing, "Link nothing") EVT_HANDLER(LinkType0Nothing, "Link nothing")
@ -2454,6 +2455,8 @@ EVT_HANDLER(LinkProto, "Local host IPC")
EVT_HANDLER(LinkConfigure, "Link options...") EVT_HANDLER(LinkConfigure, "Link options...")
{ {
#ifndef NO_LINK
wxDialog *dlg = GetXRCDialog("LinkConfig"); wxDialog *dlg = GetXRCDialog("LinkConfig");
if (ShowModal(dlg) != wxID_OK) if (ShowModal(dlg) != wxID_OK)
return; return;
@ -2463,9 +2466,9 @@ EVT_HANDLER(LinkConfigure, "Link options...")
update_opts(); update_opts();
EnableNetworkMenu(); EnableNetworkMenu();
}
#endif #endif
}

View File

@ -2255,8 +2255,17 @@ bool MainFrame::BindControls()
} }
#endif #endif
#ifdef NO_LINK #ifdef NO_LINK
if (cmdtab[i].cmd_id == XRCID("LinkConfigure") || if (cmdtab[i].cmd_id == XRCID("LanLink") ||
cmdtab[i].cmd_id == XRCID("LanLink")) { cmdtab[i].cmd_id == XRCID("LinkType0Nothing") ||
cmdtab[i].cmd_id == XRCID("LinkType1Cable") ||
cmdtab[i].cmd_id == XRCID("LinkType2Wireless") ||
cmdtab[i].cmd_id == XRCID("LinkType3GameCube") ||
cmdtab[i].cmd_id == XRCID("LinkType4Gameboy") ||
cmdtab[i].cmd_id == XRCID("LinkAuto") ||
cmdtab[i].cmd_id == XRCID("SpeedOn") ||
cmdtab[i].cmd_id == XRCID("LinkProto") ||
cmdtab[i].cmd_id == XRCID("LinkConfigure")
) {
if (mi) if (mi)
mi->GetMenu()->Remove(mi); mi->GetMenu()->Remove(mi);
cmdtab[i].cmd_id = XRCID("NOOP"); cmdtab[i].cmd_id = XRCID("NOOP");
@ -2829,13 +2838,9 @@ bool MainFrame::BindControls()
addbier(lab, true); addbier(lab, true);
/// Boot ROM /// Boot ROM
getfp("BootRom", gopts.gb_bios); getfp("BootRom", gopts.gb_bios);
addbe(fp);
getlab("BootRomLab"); getlab("BootRomLab");
addbe(lab);
getfp("CBootRom", gopts.gbc_bios); getfp("CBootRom", gopts.gbc_bios);
addbe(fp);
getlab("CBootRomLab"); getlab("CBootRomLab");
addbe(lab);
/// Custom Colors /// Custom Colors
//getcbi("Color", gbColorOption); //getcbi("Color", gbColorOption);
wxFarRadio *r = NULL; wxFarRadio *r = NULL;
@ -2910,9 +2915,7 @@ bool MainFrame::BindControls()
/// Boot ROM /// Boot ROM
getfp("BootRom", gopts.gba_bios); getfp("BootRom", gopts.gba_bios);
addbe(fp);
getlab("BootRomLab"); getlab("BootRomLab");
addbe(lab);
/// Game Overrides /// Game Overrides
getgbaw("GameSettings"); getgbaw("GameSettings");
@ -3031,7 +3034,6 @@ bool MainFrame::BindControls()
/// Game Boy /// Game Boy
wxPanel *p; wxPanel *p;
p = SafeXRCCTRL<wxPanel>(d, "GBEnhanceSoundDep"); p = SafeXRCCTRL<wxPanel>(d, "GBEnhanceSoundDep");
addbe(p);
getsl("GBEcho", gopts.gb_echo); getsl("GBEcho", gopts.gb_echo);
getsl("GBStereo", gopts.gb_stereo); getsl("GBStereo", gopts.gb_stereo);

View File

@ -213,7 +213,9 @@ opt_desc opts[] = {
INTOPT ("preferences/gbPaletteOption", "", wxTRANSLATE("The palette to use"), gbPaletteOption, 0, 2), INTOPT ("preferences/gbPaletteOption", "", wxTRANSLATE("The palette to use"), gbPaletteOption, 0, 2),
INTOPT ("preferences/gdbBreakOnLoad", "DebugGDBBreakOnLoad", wxTRANSLATE("Break into GDB after loading the game."), gdbBreakOnLoad, 0, 1), INTOPT ("preferences/gdbBreakOnLoad", "DebugGDBBreakOnLoad", wxTRANSLATE("Break into GDB after loading the game."), gdbBreakOnLoad, 0, 1),
INTOPT ("preferences/gdbPort", "DebugGDBPort", wxTRANSLATE("Port to connect GDB to."), gdbPort, 0, 65535), INTOPT ("preferences/gdbPort", "DebugGDBPort", wxTRANSLATE("Port to connect GDB to."), gdbPort, 0, 65535),
#ifndef NO_LINK
INTOPT ("preferences/LinkNumPlayers", "", wxTRANSLATE("Number of players in network"), linkNumPlayers, 2, 4), INTOPT ("preferences/LinkNumPlayers", "", wxTRANSLATE("Number of players in network"), linkNumPlayers, 2, 4),
#endif
INTOPT ("preferences/maxScale", "", wxTRANSLATE("Maximum scale factor (0 = no limit)"), maxScale, 0, 100), INTOPT ("preferences/maxScale", "", wxTRANSLATE("Maximum scale factor (0 = no limit)"), maxScale, 0, 100),
INTOPT ("preferences/pauseWhenInactive", "PauseWhenInactive", wxTRANSLATE("Pause game when main window loses focus"), pauseWhenInactive, 0, 1), INTOPT ("preferences/pauseWhenInactive", "PauseWhenInactive", wxTRANSLATE("Pause game when main window loses focus"), pauseWhenInactive, 0, 1),
INTOPT ("preferences/rtcEnabled", "RTC", wxTRANSLATE("Enable RTC (vba-over.ini override is rtcEnabled"), rtcEnabled, 0, 1), INTOPT ("preferences/rtcEnabled", "RTC", wxTRANSLATE("Enable RTC (vba-over.ini override is rtcEnabled"), rtcEnabled, 0, 1),

View File

@ -1,6 +1,6 @@
#include "wxvbam.h" #include "wxvbam.h"
#include "viewsupt.h" #include "viewsupt.h"
#include "..\common\ConfigManager.h" #include "../common/ConfigManager.h"
namespace Viewers namespace Viewers
{ {