Hooked up the GB Printer option in the wx menu
This commit is contained in:
parent
573a91cb00
commit
88f21433b3
|
@ -1007,7 +1007,7 @@ void gbWriteMemory(register u16 address, register u8 value)
|
|||
}
|
||||
EmuReseted = false;
|
||||
gbMemory[0xff02] = value;
|
||||
if (gbSerialOn && GetLinkMode() == LINK_GAMEBOY) {
|
||||
if (gbSerialOn && (GetLinkMode() == LINK_GAMEBOY || winGbPrinterEnabled)) {
|
||||
gbSerialTicks = GBSERIAL_CLOCK_TICKS;
|
||||
|
||||
LinkIsWaiting = true;
|
||||
|
|
|
@ -1841,7 +1841,6 @@ EVT_HANDLER(GameBoyConfigure, "Game Boy options...")
|
|||
wxDialog *dlg = GetXRCDialog("GameBoyConfig");
|
||||
wxChoice *c = XRCCTRL(*dlg, "Borders", wxChoice);
|
||||
bool borderon = gbBorderOn;
|
||||
bool printeron = gopts.gbprint;
|
||||
if(!gbBorderOn && !gbBorderAutomatic)
|
||||
c->SetSelection(0);
|
||||
else if(gbBorderOn)
|
||||
|
@ -1877,15 +1876,6 @@ EVT_HANDLER(GameBoyConfigure, "Game Boy options...")
|
|||
// don't want to have to reset to change colors
|
||||
memcpy(gbPalette, &systemGbPalette[gbPaletteOption * 8], 8 * sizeof(systemGbPalette[0]));
|
||||
}
|
||||
#if (defined __WIN32__ || defined _WIN32)
|
||||
gbSerialFunction = gbStartLink;
|
||||
#else
|
||||
gbSerialFunction = NULL;
|
||||
#endif
|
||||
if(printeron != gopts.gbprint) {
|
||||
if(gopts.gbprint)
|
||||
gbSerialFunction = gbPrinterSend;
|
||||
}
|
||||
update_opts();
|
||||
}
|
||||
|
||||
|
@ -2226,7 +2216,15 @@ EVT_HANDLER(RetainAspect, "Retain aspect ratio when resizing")
|
|||
|
||||
EVT_HANDLER(Printer, "Enable printer emulation")
|
||||
{
|
||||
GetMenuOptionBool("Printer", gopts.gbprint);
|
||||
GetMenuOptionInt("Printer", winGbPrinterEnabled, 1);
|
||||
#if (defined __WIN32__ || defined _WIN32)
|
||||
gbSerialFunction = gbStartLink;
|
||||
#else
|
||||
gbSerialFunction = NULL;
|
||||
#endif
|
||||
if (winGbPrinterEnabled)
|
||||
gbSerialFunction = gbPrinterSend;
|
||||
|
||||
update_opts();
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,6 @@ opt_desc opts[] = {
|
|||
|
||||
/// GB
|
||||
STROPT ("GB/BiosFile", "", wxTRANSLATE("BIOS file to use for GB, if enabled"), gopts.gb_bios),
|
||||
BOOLOPT("GB/EnablePrinter", "Printer", wxTRANSLATE("Enable printer emulation"), gopts.gbprint),
|
||||
STROPT ("GB/GBCBiosFile", "", wxTRANSLATE("BIOS file to use for GBC, if enabled"), gopts.gbc_bios),
|
||||
BOOLOPT("GB/LCDColor", "Color", wxTRANSLATE("Emulate washed colors of LCD"), gopts.gbcColorOption),
|
||||
{ wxT("GB/Palette0"), "", wxTRANSLATE("The default palette, as 8 comma-separated 4-digit hex integers (rgb555).") },
|
||||
|
@ -212,6 +211,7 @@ opt_desc opts[] = {
|
|||
INTOPT ("preferences/fullScreen", "Fullscreen", wxTRANSLATE("Enter fullscreen mode at startup"), fullScreen, 0, 1),
|
||||
INTOPT ("preferences/gbFrameSkip", "", wxTRANSLATE("Skip frames. Values are 0-9 or -1 to skip automatically based on time."), gbFrameSkip, -1, 9),
|
||||
INTOPT ("preferences/gbPaletteOption", "", wxTRANSLATE("The palette to use"), gbPaletteOption, 0, 2),
|
||||
INTOPT ("preferences/gbPrinter", "Printer", wxTRANSLATE("Enable printer emulation"), winGbPrinterEnabled, 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),
|
||||
#ifndef NO_LINK
|
||||
|
@ -288,7 +288,7 @@ opts_t::opts_t()
|
|||
}
|
||||
recent = new wxFileHistory(10);
|
||||
autofire_rate = 1;
|
||||
gbprint = print_auto_page = true;
|
||||
print_auto_page = true;
|
||||
autoPatch = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ extern struct opts_t {
|
|||
|
||||
/// GB
|
||||
wxString gb_bios;
|
||||
bool gbprint; // gbSerialFunction
|
||||
wxString gbc_bios;
|
||||
bool gbcColorOption;
|
||||
// u16 systemGbPalette[8*3];
|
||||
|
|
|
@ -278,7 +278,7 @@ void GameArea::LoadGame(const wxString &name)
|
|||
gbSerialFunction = NULL;
|
||||
#endif
|
||||
// probably only need to do this for GB carts
|
||||
if(gopts.gbprint)
|
||||
if(winGbPrinterEnabled)
|
||||
gbSerialFunction = gbPrinterSend;
|
||||
|
||||
// probably only need to do this for GBA carts
|
||||
|
|
Loading…
Reference in New Issue