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 <locale>
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include "GBA.h"

View File

@ -177,7 +177,7 @@ if(APPLE)
SET(CMAKE_EXECUTABLE_SUFFIX .app)
# this should set ROM file types correctly
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_SOURCE_FILES_PROPERTIES(wxvbam.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
endif(APPLE)

View File

@ -2356,8 +2356,6 @@ EVT_HANDLER(VSync, "Wait for vertical sync")
update_opts();
}
#ifndef NO_LINK
void MainFrame::EnableNetworkMenu()
{
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)
{
#ifndef NO_LINK
LinkMode mode = GetLinkMode();
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."));
return;
}
wxDialog *dlg = GetXRCDialog("NetLink");
ShowModal(dlg);
panel->SetFrameTitle();
#endif
}
EVT_HANDLER(LinkType0Nothing, "Link nothing")
@ -2454,6 +2455,8 @@ EVT_HANDLER(LinkProto, "Local host IPC")
EVT_HANDLER(LinkConfigure, "Link options...")
{
#ifndef NO_LINK
wxDialog *dlg = GetXRCDialog("LinkConfig");
if (ShowModal(dlg) != wxID_OK)
return;
@ -2463,9 +2466,9 @@ EVT_HANDLER(LinkConfigure, "Link options...")
update_opts();
EnableNetworkMenu();
}
#endif
}

View File

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

View File

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