Update to bsnes v052 release.
This is a maintenance release, which fixes a few important bugs. It also adds some graphical icons to soften the user interface. Note that if you have set any custom paths with v051, you'll need to set them again for the fix to work. As always, my apologies for releasing two versions so close together. I felt the bugs were important enough to warrant it. Changelog: - fixed loading of files and folders containing non-ANSI characters (Chinese, Japanese, etc) - fixed a slight lag on startup due to the new file browser - fixed path selection setting, screenshots will now be saved to the correct directory - hid memory editor scrollbar since it does not work yet - disabled window positioning on Linux due to bugs in the Compiz compositor - added icons from the Tango icon library to the menus and panels
|
@ -1,4 +1,4 @@
|
||||||
static const char bsnesVersion[] = "0.051";
|
static const char bsnesVersion[] = "0.052";
|
||||||
static const char bsnesTitle[] = "bsnes";
|
static const char bsnesTitle[] = "bsnes";
|
||||||
static const unsigned bsnesSaveStateVersion = 3;
|
static const unsigned bsnesSaveStateVersion = 3;
|
||||||
|
|
||||||
|
|
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 897 B |
After Width: | Height: | Size: 685 B |
After Width: | Height: | Size: 632 B |
After Width: | Height: | Size: 477 B |
After Width: | Height: | Size: 672 B |
After Width: | Height: | Size: 932 B |
After Width: | Height: | Size: 558 B |
After Width: | Height: | Size: 812 B |
After Width: | Height: | Size: 720 B |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 820 B |
After Width: | Height: | Size: 378 B |
After Width: | Height: | Size: 534 B |
After Width: | Height: | Size: 333 B |
After Width: | Height: | Size: 668 B |
After Width: | Height: | Size: 662 B |
After Width: | Height: | Size: 650 B |
After Width: | Height: | Size: 912 B |
After Width: | Height: | Size: 995 B |
After Width: | Height: | Size: 978 B |
After Width: | Height: | Size: 848 B |
After Width: | Height: | Size: 927 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 482 B |
After Width: | Height: | Size: 966 B |
|
@ -202,7 +202,7 @@ DiskBrowser::DiskBrowser() {
|
||||||
applyPatch = new QCheckBox("Apply UPS patch");
|
applyPatch = new QCheckBox("Apply UPS patch");
|
||||||
applyPatch->setChecked(true);
|
applyPatch->setChecked(true);
|
||||||
applyPatch->setVisible(false);
|
applyPatch->setVisible(false);
|
||||||
//applyPatch->setEnabled(false);
|
applyPatch->setEnabled(false);
|
||||||
layout->addWidget(applyPatch);
|
layout->addWidget(applyPatch);
|
||||||
|
|
||||||
connect(this, SIGNAL(itemActivated(const QString&, bool)), this, SLOT(onActivate(const QString&, bool)));
|
connect(this, SIGNAL(itemActivated(const QString&, bool)), this, SLOT(onActivate(const QString&, bool)));
|
||||||
|
|
|
@ -11,31 +11,39 @@ MainWindow::MainWindow() {
|
||||||
|
|
||||||
system = menuBar->addMenu("System");
|
system = menuBar->addMenu("System");
|
||||||
system_load = system->addAction("Load Cartridge ...");
|
system_load = system->addAction("Load Cartridge ...");
|
||||||
|
system_load->setIcon(QIcon(":/16x16/document-open.png"));
|
||||||
system->addSeparator();
|
system->addSeparator();
|
||||||
system_power = system->addMenu("Power");
|
system_power = system->addAction("Power");
|
||||||
system_power_on = system_power->addAction("On");
|
system_power->setIcon(QIcon(":/16x16/system-shutdown.png"));
|
||||||
system_power_on->setCheckable(true);
|
system_power->setCheckable(true);
|
||||||
system_power_off = system_power->addAction("Off");
|
|
||||||
system_power_off->setCheckable(true);
|
|
||||||
system_reset = system->addAction("Reset");
|
system_reset = system->addAction("Reset");
|
||||||
|
system_reset->setIcon(QIcon(":/16x16/view-refresh.png"));
|
||||||
system->addSeparator();
|
system->addSeparator();
|
||||||
system_port1 = system->addMenu("Controller Port 1");
|
system_port1 = system->addMenu("Controller Port 1");
|
||||||
|
system_port1->setIcon(QIcon(":/16x16/input-gaming.png"));
|
||||||
system_port1_none = system_port1->addAction("None");
|
system_port1_none = system_port1->addAction("None");
|
||||||
system_port1_none->setCheckable(true);
|
system_port1_none->setCheckable(true);
|
||||||
system_port1_joypad = system_port1->addAction("Joypad");
|
system_port1_joypad = system_port1->addAction("Joypad");
|
||||||
|
system_port1_joypad->setIcon(QIcon(":/16x16/input-gaming.png"));
|
||||||
system_port1_joypad->setCheckable(true);
|
system_port1_joypad->setCheckable(true);
|
||||||
system_port1_multitap = system_port1->addAction("Multitap");
|
system_port1_multitap = system_port1->addAction("Multitap");
|
||||||
|
system_port1_multitap->setIcon(QIcon(":/16x16/input-gaming.png"));
|
||||||
system_port1_multitap->setCheckable(true);
|
system_port1_multitap->setCheckable(true);
|
||||||
system_port1_mouse = system_port1->addAction("Mouse");
|
system_port1_mouse = system_port1->addAction("Mouse");
|
||||||
|
system_port1_mouse->setIcon(QIcon(":/16x16/input-mouse.png"));
|
||||||
system_port1_mouse->setCheckable(true);
|
system_port1_mouse->setCheckable(true);
|
||||||
system_port2 = system->addMenu("Controller Port 2");
|
system_port2 = system->addMenu("Controller Port 2");
|
||||||
|
system_port2->setIcon(QIcon(":/16x16/input-gaming.png"));
|
||||||
system_port2_none = system_port2->addAction("None");
|
system_port2_none = system_port2->addAction("None");
|
||||||
system_port2_none->setCheckable(true);
|
system_port2_none->setCheckable(true);
|
||||||
system_port2_joypad = system_port2->addAction("Joypad");
|
system_port2_joypad = system_port2->addAction("Joypad");
|
||||||
|
system_port2_joypad->setIcon(QIcon(":/16x16/input-gaming.png"));
|
||||||
system_port2_joypad->setCheckable(true);
|
system_port2_joypad->setCheckable(true);
|
||||||
system_port2_multitap = system_port2->addAction("Multitap");
|
system_port2_multitap = system_port2->addAction("Multitap");
|
||||||
|
system_port2_multitap->setIcon(QIcon(":/16x16/input-gaming.png"));
|
||||||
system_port2_multitap->setCheckable(true);
|
system_port2_multitap->setCheckable(true);
|
||||||
system_port2_mouse = system_port2->addAction("Mouse");
|
system_port2_mouse = system_port2->addAction("Mouse");
|
||||||
|
system_port2_mouse->setIcon(QIcon(":/16x16/input-mouse.png"));
|
||||||
system_port2_mouse->setCheckable(true);
|
system_port2_mouse->setCheckable(true);
|
||||||
system_port2_superscope = system_port2->addAction("Super Scope");
|
system_port2_superscope = system_port2->addAction("Super Scope");
|
||||||
system_port2_superscope->setCheckable(true);
|
system_port2_superscope->setCheckable(true);
|
||||||
|
@ -47,10 +55,12 @@ MainWindow::MainWindow() {
|
||||||
system->addSeparator();
|
system->addSeparator();
|
||||||
#endif
|
#endif
|
||||||
system_exit = system->addAction("Exit");
|
system_exit = system->addAction("Exit");
|
||||||
|
system_exit->setIcon(QIcon(":/16x16/process-stop.png"));
|
||||||
system_exit->setMenuRole(QAction::QuitRole);
|
system_exit->setMenuRole(QAction::QuitRole);
|
||||||
|
|
||||||
settings = menuBar->addMenu("Settings");
|
settings = menuBar->addMenu("Settings");
|
||||||
settings_videoMode = settings->addMenu("Video Mode");
|
settings_videoMode = settings->addMenu("Video Mode");
|
||||||
|
settings_videoMode->setIcon(QIcon(":/16x16/video-display.png"));
|
||||||
settings_videoMode_1x = settings_videoMode->addAction("Scale 1x");
|
settings_videoMode_1x = settings_videoMode->addAction("Scale 1x");
|
||||||
settings_videoMode_1x->setCheckable(true);
|
settings_videoMode_1x->setCheckable(true);
|
||||||
settings_videoMode_2x = settings_videoMode->addAction("Scale 2x");
|
settings_videoMode_2x = settings_videoMode->addAction("Scale 2x");
|
||||||
|
@ -65,6 +75,7 @@ MainWindow::MainWindow() {
|
||||||
settings_videoMode_correctAspectRatio = settings_videoMode->addAction("Correct Aspect Ratio");
|
settings_videoMode_correctAspectRatio = settings_videoMode->addAction("Correct Aspect Ratio");
|
||||||
settings_videoMode_correctAspectRatio->setCheckable(true);
|
settings_videoMode_correctAspectRatio->setCheckable(true);
|
||||||
settings_videoMode_fullscreen = settings_videoMode->addAction("Fullscreen");
|
settings_videoMode_fullscreen = settings_videoMode->addAction("Fullscreen");
|
||||||
|
settings_videoMode_fullscreen->setIcon(QIcon(":/16x16/view-fullscreen.png"));
|
||||||
settings_videoMode_fullscreen->setCheckable(true);
|
settings_videoMode_fullscreen->setCheckable(true);
|
||||||
settings_videoMode->addSeparator();
|
settings_videoMode->addSeparator();
|
||||||
settings_videoMode_ntsc = settings_videoMode->addAction("NTSC");
|
settings_videoMode_ntsc = settings_videoMode->addAction("NTSC");
|
||||||
|
@ -72,6 +83,7 @@ MainWindow::MainWindow() {
|
||||||
settings_videoMode_pal = settings_videoMode->addAction("PAL");
|
settings_videoMode_pal = settings_videoMode->addAction("PAL");
|
||||||
settings_videoMode_pal->setCheckable(true);
|
settings_videoMode_pal->setCheckable(true);
|
||||||
settings_videoFilter = settings->addMenu("Video Filter");
|
settings_videoFilter = settings->addMenu("Video Filter");
|
||||||
|
settings_videoFilter->setIcon(QIcon(":/16x16/image-x-generic.png"));
|
||||||
settings_videoFilter_point = settings_videoFilter->addAction("Point");
|
settings_videoFilter_point = settings_videoFilter->addAction("Point");
|
||||||
settings_videoFilter_point->setCheckable(true);
|
settings_videoFilter_point->setCheckable(true);
|
||||||
settings_videoFilter_linear = settings_videoFilter->addAction("Linear");
|
settings_videoFilter_linear = settings_videoFilter->addAction("Linear");
|
||||||
|
@ -91,9 +103,11 @@ MainWindow::MainWindow() {
|
||||||
settings_videoFilter_ntsc->setCheckable(true);
|
settings_videoFilter_ntsc->setCheckable(true);
|
||||||
settings->addSeparator();
|
settings->addSeparator();
|
||||||
settings_muteAudio = settings->addAction("Mute Audio Output");
|
settings_muteAudio = settings->addAction("Mute Audio Output");
|
||||||
|
settings_muteAudio->setIcon(QIcon(":/16x16/audio-volume-muted.png"));
|
||||||
settings_muteAudio->setCheckable(true);
|
settings_muteAudio->setCheckable(true);
|
||||||
settings->addSeparator();
|
settings->addSeparator();
|
||||||
settings_emulationSpeed = settings->addMenu("Emulation Speed");
|
settings_emulationSpeed = settings->addMenu("Emulation Speed");
|
||||||
|
settings_emulationSpeed->setIcon(QIcon(":/16x16/appointment-new.png"));
|
||||||
settings_emulationSpeed_slowest = settings_emulationSpeed->addAction("50%");
|
settings_emulationSpeed_slowest = settings_emulationSpeed->addAction("50%");
|
||||||
settings_emulationSpeed_slowest->setCheckable(true);
|
settings_emulationSpeed_slowest->setCheckable(true);
|
||||||
settings_emulationSpeed_slow = settings_emulationSpeed->addAction("75%");
|
settings_emulationSpeed_slow = settings_emulationSpeed->addAction("75%");
|
||||||
|
@ -106,30 +120,39 @@ MainWindow::MainWindow() {
|
||||||
settings_emulationSpeed_fastest->setCheckable(true);
|
settings_emulationSpeed_fastest->setCheckable(true);
|
||||||
settings_emulationSpeed->addSeparator();
|
settings_emulationSpeed->addSeparator();
|
||||||
settings_emulationSpeed_syncVideo = settings_emulationSpeed->addAction("Sync Video");
|
settings_emulationSpeed_syncVideo = settings_emulationSpeed->addAction("Sync Video");
|
||||||
|
settings_emulationSpeed_syncVideo->setIcon(QIcon(":/16x16/video-display.png"));
|
||||||
settings_emulationSpeed_syncVideo->setCheckable(true);
|
settings_emulationSpeed_syncVideo->setCheckable(true);
|
||||||
settings_emulationSpeed_syncAudio = settings_emulationSpeed->addAction("Sync Audio");
|
settings_emulationSpeed_syncAudio = settings_emulationSpeed->addAction("Sync Audio");
|
||||||
|
settings_emulationSpeed_syncAudio->setIcon(QIcon(":/16x16/audio-volume-high.png"));
|
||||||
settings_emulationSpeed_syncAudio->setCheckable(true);
|
settings_emulationSpeed_syncAudio->setCheckable(true);
|
||||||
settings_configuration = settings->addAction("Configuration ...");
|
settings_configuration = settings->addAction("Configuration ...");
|
||||||
|
settings_configuration->setIcon(QIcon(":/16x16/preferences-desktop.png"));
|
||||||
settings_configuration->setMenuRole(QAction::PreferencesRole);
|
settings_configuration->setMenuRole(QAction::PreferencesRole);
|
||||||
|
|
||||||
tools = menuBar->addMenu("Tools");
|
tools = menuBar->addMenu("Tools");
|
||||||
tools_cheatEditor = tools->addAction("Cheat Editor ...");
|
tools_cheatEditor = tools->addAction("Cheat Editor ...");
|
||||||
|
tools_cheatEditor->setIcon(QIcon(":/16x16/accessories-text-editor.png"));
|
||||||
tools_stateManager = tools->addAction("State Manager ...");
|
tools_stateManager = tools->addAction("State Manager ...");
|
||||||
|
tools_stateManager->setIcon(QIcon(":/16x16/system-file-manager.png"));
|
||||||
#if defined(DEBUGGER)
|
#if defined(DEBUGGER)
|
||||||
tools->addSeparator();
|
tools->addSeparator();
|
||||||
#endif
|
#endif
|
||||||
tools_debugger = tools->addAction("Debugger ...");
|
tools_debugger = tools->addAction("Debugger ...");
|
||||||
|
tools_debugger->setIcon(QIcon(":/16x16/utilities-terminal.png"));
|
||||||
#if !defined(DEBUGGER)
|
#if !defined(DEBUGGER)
|
||||||
tools_debugger->setVisible(false);
|
tools_debugger->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
help = menuBar->addMenu("Help");
|
help = menuBar->addMenu("Help");
|
||||||
help_documentation = help->addAction("Documentation ...");
|
help_documentation = help->addAction("Documentation ...");
|
||||||
|
help_documentation->setIcon(QIcon(":/16x16/text-x-generic.png"));
|
||||||
help_license = help->addAction("License ...");
|
help_license = help->addAction("License ...");
|
||||||
|
help_license->setIcon(QIcon(":/16x16/text-x-generic.png"));
|
||||||
#if !defined(PLATFORM_OSX)
|
#if !defined(PLATFORM_OSX)
|
||||||
help->addSeparator();
|
help->addSeparator();
|
||||||
#endif
|
#endif
|
||||||
help_about = help->addAction("About ...");
|
help_about = help->addAction("About ...");
|
||||||
|
help_about->setIcon(QIcon(":/16x16/help-browser.png"));
|
||||||
help_about->setMenuRole(QAction::AboutRole);
|
help_about->setMenuRole(QAction::AboutRole);
|
||||||
|
|
||||||
//canvas
|
//canvas
|
||||||
|
@ -175,8 +198,7 @@ MainWindow::MainWindow() {
|
||||||
|
|
||||||
//slots
|
//slots
|
||||||
connect(system_load, SIGNAL(triggered()), this, SLOT(loadCartridge()));
|
connect(system_load, SIGNAL(triggered()), this, SLOT(loadCartridge()));
|
||||||
connect(system_power_on, SIGNAL(triggered()), this, SLOT(powerOn()));
|
connect(system_power, SIGNAL(triggered()), this, SLOT(power()));
|
||||||
connect(system_power_off, SIGNAL(triggered()), this, SLOT(powerOff()));
|
|
||||||
connect(system_reset, SIGNAL(triggered()), this, SLOT(reset()));
|
connect(system_reset, SIGNAL(triggered()), this, SLOT(reset()));
|
||||||
connect(system_port1_none, SIGNAL(triggered()), this, SLOT(setPort1None()));
|
connect(system_port1_none, SIGNAL(triggered()), this, SLOT(setPort1None()));
|
||||||
connect(system_port1_joypad, SIGNAL(triggered()), this, SLOT(setPort1Joypad()));
|
connect(system_port1_joypad, SIGNAL(triggered()), this, SLOT(setPort1Joypad()));
|
||||||
|
@ -228,8 +250,8 @@ MainWindow::MainWindow() {
|
||||||
|
|
||||||
void MainWindow::syncUi() {
|
void MainWindow::syncUi() {
|
||||||
system_power->setEnabled(SNES::cartridge.loaded());
|
system_power->setEnabled(SNES::cartridge.loaded());
|
||||||
system_power_on->setChecked (application.power == true);
|
system_power->setChecked (application.power == true);
|
||||||
system_power_off->setChecked(application.power == false);
|
system_power->setEnabled(SNES::cartridge.loaded());
|
||||||
system_reset->setEnabled(SNES::cartridge.loaded() && application.power);
|
system_reset->setEnabled(SNES::cartridge.loaded() && application.power);
|
||||||
|
|
||||||
system_port1_none->setChecked (SNES::config.controller_port1 == SNES::Input::DeviceNone);
|
system_port1_none->setChecked (SNES::config.controller_port1 == SNES::Input::DeviceNone);
|
||||||
|
@ -284,9 +306,17 @@ void MainWindow::loadCartridge() {
|
||||||
diskBrowser->loadAnyCartridge();
|
diskBrowser->loadAnyCartridge();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::powerOn() { utility.modifySystemState(Utility::PowerOn); }
|
void MainWindow::power() {
|
||||||
void MainWindow::powerOff() { utility.modifySystemState(Utility::PowerOff); }
|
if(system_power->isChecked()) {
|
||||||
void MainWindow::reset() { utility.modifySystemState(Utility::Reset); }
|
utility.modifySystemState(Utility::PowerOn);
|
||||||
|
} else {
|
||||||
|
utility.modifySystemState(Utility::PowerOff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::reset() {
|
||||||
|
utility.modifySystemState(Utility::Reset);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::setPort1None() { SNES::config.controller_port1 = SNES::Input::DeviceNone; utility.updateControllers(); syncUi(); }
|
void MainWindow::setPort1None() { SNES::config.controller_port1 = SNES::Input::DeviceNone; utility.updateControllers(); syncUi(); }
|
||||||
void MainWindow::setPort1Joypad() { SNES::config.controller_port1 = SNES::Input::DeviceJoypad; utility.updateControllers(); syncUi(); }
|
void MainWindow::setPort1Joypad() { SNES::config.controller_port1 = SNES::Input::DeviceJoypad; utility.updateControllers(); syncUi(); }
|
||||||
|
|
|
@ -24,9 +24,7 @@ public:
|
||||||
QVBoxLayout *layout;
|
QVBoxLayout *layout;
|
||||||
QMenu *system;
|
QMenu *system;
|
||||||
QAction *system_load;
|
QAction *system_load;
|
||||||
QMenu *system_power;
|
QAction *system_power;
|
||||||
QAction *system_power_on;
|
|
||||||
QAction *system_power_off;
|
|
||||||
QAction *system_reset;
|
QAction *system_reset;
|
||||||
QMenu *system_port1;
|
QMenu *system_port1;
|
||||||
QAction *system_port1_none;
|
QAction *system_port1_none;
|
||||||
|
@ -92,8 +90,7 @@ public:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void loadCartridge();
|
void loadCartridge();
|
||||||
void powerOn();
|
void power();
|
||||||
void powerOff();
|
|
||||||
void reset();
|
void reset();
|
||||||
void setPort1None();
|
void setPort1None();
|
||||||
void setPort1Joypad();
|
void setPort1Joypad();
|
||||||
|
|
|
@ -106,7 +106,7 @@ Configuration::Configuration() {
|
||||||
attach(audio.outputFrequency = 48000, "audio.outputFrequency");
|
attach(audio.outputFrequency = 48000, "audio.outputFrequency");
|
||||||
attach(audio.inputFrequency = 32000, "audio.inputFrequency");
|
attach(audio.inputFrequency = 32000, "audio.inputFrequency");
|
||||||
|
|
||||||
attach(input.focusPolicy = Input::FocusPolicyPauseEmulation, "input.focusPolicy");
|
attach(input.focusPolicy = Input::FocusPolicyIgnoreInput, "input.focusPolicy");
|
||||||
attach(input.allowInvalidInput = false, "input.allowInvalidInput", "Allow up+down / left+right combinations; may trigger bugs in some games");
|
attach(input.allowInvalidInput = false, "input.allowInvalidInput", "Allow up+down / left+right combinations; may trigger bugs in some games");
|
||||||
|
|
||||||
attach(input.joypad1.up = "keyboard00.up", "input.joypad1.up");
|
attach(input.joypad1.up = "keyboard00.up", "input.joypad1.up");
|
||||||
|
|
|
@ -16,11 +16,15 @@ Debugger::Debugger() {
|
||||||
|
|
||||||
tools = menu->addMenu("Tools");
|
tools = menu->addMenu("Tools");
|
||||||
tools_breakpoint = tools->addAction("Breakpoint Editor ...");
|
tools_breakpoint = tools->addAction("Breakpoint Editor ...");
|
||||||
|
tools_breakpoint->setIcon(QIcon(":/16x16/process-stop.png"));
|
||||||
tools_memory = tools->addAction("Memory Editor ...");
|
tools_memory = tools->addAction("Memory Editor ...");
|
||||||
|
tools_memory->setIcon(QIcon(":/16x16/text-x-generic.png"));
|
||||||
tools_vramViewer = tools->addAction("Video RAM Viewer ...");
|
tools_vramViewer = tools->addAction("Video RAM Viewer ...");
|
||||||
|
tools_vramViewer->setIcon(QIcon(":/16x16/image-x-generic.png"));
|
||||||
|
|
||||||
miscOptions = menu->addMenu("Misc");
|
miscOptions = menu->addMenu("Misc");
|
||||||
miscOptions_clear = miscOptions->addAction("Clear Console");
|
miscOptions_clear = miscOptions->addAction("Clear Console");
|
||||||
|
miscOptions_clear->setIcon(QIcon(":/16x16/document-new.png"));
|
||||||
|
|
||||||
console = new QTextEdit;
|
console = new QTextEdit;
|
||||||
console->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
console->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
|
|
@ -35,7 +35,7 @@ MemoryEditor::MemoryEditor() {
|
||||||
|
|
||||||
editor = new QbHexEdit;
|
editor = new QbHexEdit;
|
||||||
editor->setFont(QFont(Style::Monospace));
|
editor->setFont(QFont(Style::Monospace));
|
||||||
editor->setMinimumWidth((60 + 2) * editor->fontMetrics().width(' '));
|
editor->setMinimumWidth((58 + 2) * editor->fontMetrics().width(' '));
|
||||||
editor->setMinimumHeight((16 + 1) * editor->fontMetrics().height());
|
editor->setMinimumHeight((16 + 1) * editor->fontMetrics().height());
|
||||||
|
|
||||||
editor->reader = bind(&MemoryEditor::reader, this);
|
editor->reader = bind(&MemoryEditor::reader, this);
|
||||||
|
|
|
@ -40,15 +40,16 @@ QPushButton *QbDiskBrowser::acceptButton() { return load; }
|
||||||
void QbDiskBrowser::setPath(const QString &reqPath) {
|
void QbDiskBrowser::setPath(const QString &reqPath) {
|
||||||
disconnect(path, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePath()));
|
disconnect(path, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePath()));
|
||||||
|
|
||||||
|
QString effectivePath = reqPath;
|
||||||
|
if(effectivePath == "<root>") effectivePath = "";
|
||||||
path->clear();
|
path->clear();
|
||||||
view->setRootIndex(model->index(reqPath));
|
model->setRootPath(effectivePath);
|
||||||
|
view->setRootIndex(model->index(effectivePath));
|
||||||
view->setCurrentIndex(view->rootIndex());
|
view->setCurrentIndex(view->rootIndex());
|
||||||
view->setFocus();
|
view->setFocus();
|
||||||
|
|
||||||
string effectivePath = reqPath.toUtf8().constData();
|
|
||||||
if(effectivePath == "<root>") effectivePath = "";
|
|
||||||
if(effectivePath.length() > 0) {
|
if(effectivePath.length() > 0) {
|
||||||
QDir directory((const char*)effectivePath);
|
QDir directory(effectivePath);
|
||||||
while(true) {
|
while(true) {
|
||||||
path->addItem(directory.absolutePath());
|
path->addItem(directory.absolutePath());
|
||||||
if(directory.isRoot()) break;
|
if(directory.isRoot()) break;
|
||||||
|
@ -157,7 +158,6 @@ QbDiskBrowser::QbDiskBrowser() {
|
||||||
controlLayout->addWidget(cancel);
|
controlLayout->addWidget(cancel);
|
||||||
|
|
||||||
model = new QFileSystemModel;
|
model = new QFileSystemModel;
|
||||||
model->setRootPath("");
|
|
||||||
model->setFilter(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
|
model->setFilter(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
|
||||||
model->setNameFilterDisables(false);
|
model->setNameFilterDisables(false);
|
||||||
|
|
||||||
|
|
|
@ -152,6 +152,6 @@ QbHexEdit::QbHexEdit() {
|
||||||
scrollBar = new QbHexEditScrollBar;
|
scrollBar = new QbHexEditScrollBar;
|
||||||
scrollBar->setEnabled(false);
|
scrollBar->setEnabled(false);
|
||||||
setVerticalScrollBar(scrollBar);
|
setVerticalScrollBar(scrollBar);
|
||||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
void QbWindow::showHidden(bool state) {
|
void QbWindow::showHidden(bool state) {
|
||||||
#if defined(PLATFORM_X)
|
#if !defined(PLATFORM_X)
|
||||||
if(state) {
|
|
||||||
showMinimized();
|
|
||||||
} else {
|
|
||||||
showNormal();
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if(state) {
|
if(state) {
|
||||||
setWindowOpacity(0.0);
|
setWindowOpacity(0.0);
|
||||||
} else {
|
} else {
|
||||||
|
@ -16,18 +10,14 @@ void QbWindow::showHidden(bool state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbWindow::showAt(double x, double y) {
|
void QbWindow::showAt(double x, double y) {
|
||||||
|
#if defined(PLATFORM_X)
|
||||||
|
resize(0, 0);
|
||||||
|
showNormal();
|
||||||
|
#else
|
||||||
if(isVisible() == false) showHidden(true);
|
if(isVisible() == false) showHidden(true);
|
||||||
resize(0, 0);
|
resize(0, 0);
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
|
|
||||||
#if defined(PLATFORM_X)
|
|
||||||
for(unsigned counter = 0; counter < 4096; counter++) {
|
|
||||||
if(frameSize() != size()) break;
|
|
||||||
usleep(5000);
|
|
||||||
QApplication::processEvents();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QRect deskRect = QApplication::desktop()->availableGeometry(this);
|
QRect deskRect = QApplication::desktop()->availableGeometry(this);
|
||||||
|
|
||||||
//convert cartesian coordinates to linear scale (-1.0 -> 0.0, 0.0 -> 0.5, +1.0 -> +1.0)
|
//convert cartesian coordinates to linear scale (-1.0 -> 0.0, 0.0 -> 0.5, +1.0 -> +1.0)
|
||||||
|
@ -39,6 +29,7 @@ void QbWindow::showAt(double x, double y) {
|
||||||
|
|
||||||
move(deskRect.left() + availableWidth * x, deskRect.top() + availableHeight * y);
|
move(deskRect.left() + availableWidth * x, deskRect.top() + availableHeight * y);
|
||||||
showHidden(false);
|
showHidden(false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbWindow::setFocus() {
|
void QbWindow::setFocus() {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <windows.h>
|
|
||||||
#include <nall/utf8.hpp>
|
#include <nall/utf8.hpp>
|
||||||
|
|
||||||
char* realpath(const char *filename, char *resolvedname) {
|
char* realpath(const char *filename, char *resolvedname) {
|
||||||
|
|
|
@ -6,5 +6,33 @@
|
||||||
<file alias="joypad.png">../../data/joypad.png</file>
|
<file alias="joypad.png">../../data/joypad.png</file>
|
||||||
<file alias="documentation.html">../../data/documentation.html</file>
|
<file alias="documentation.html">../../data/documentation.html</file>
|
||||||
<file alias="license.html">../../data/license.html</file>
|
<file alias="license.html">../../data/license.html</file>
|
||||||
|
|
||||||
|
<file alias="16x16/accessories-text-editor.png">../../data/icons-16x16/accessories-text-editor.png</file>
|
||||||
|
<file alias="16x16/appointment-new.png">../../data/icons-16x16/appointment-new.png</file>
|
||||||
|
<file alias="16x16/audio-volume-high.png">../../data/icons-16x16/audio-volume-high.png</file>
|
||||||
|
<file alias="16x16/audio-volume-muted.png">../../data/icons-16x16/audio-volume-muted.png</file>
|
||||||
|
<file alias="16x16/document-new.png">../../data/icons-16x16/document-new.png</file>
|
||||||
|
<file alias="16x16/document-open.png">../../data/icons-16x16/document-open.png</file>
|
||||||
|
<file alias="16x16/help-browser.png">../../data/icons-16x16/help-browser.png</file>
|
||||||
|
<file alias="16x16/image-x-generic.png">../../data/icons-16x16/image-x-generic.png</file>
|
||||||
|
<file alias="16x16/input-gaming.png">../../data/icons-16x16/input-gaming.png</file>
|
||||||
|
<file alias="16x16/input-mouse.png">../../data/icons-16x16/input-mouse.png</file>
|
||||||
|
<file alias="16x16/preferences-desktop.png">../../data/icons-16x16/preferences-desktop.png</file>
|
||||||
|
<file alias="16x16/process-stop.png">../../data/icons-16x16/process-stop.png</file>
|
||||||
|
<file alias="16x16/system-file-manager.png">../../data/icons-16x16/system-file-manager.png</file>
|
||||||
|
<file alias="16x16/system-shutdown.png">../../data/icons-16x16/system-shutdown.png</file>
|
||||||
|
<file alias="16x16/text-x-generic.png">../../data/icons-16x16/text-x-generic.png</file>
|
||||||
|
<file alias="16x16/utilities-terminal.png">../../data/icons-16x16/utilities-terminal.png</file>
|
||||||
|
<file alias="16x16/video-display.png">../../data/icons-16x16/video-display.png</file>
|
||||||
|
<file alias="16x16/view-fullscreen.png">../../data/icons-16x16/view-fullscreen.png</file>
|
||||||
|
<file alias="16x16/view-refresh.png">../../data/icons-16x16/view-refresh.png</file>
|
||||||
|
|
||||||
|
<file alias="22x22/accessories-text-editor.png">../../data/icons-22x22/accessories-text-editor.png</file>
|
||||||
|
<file alias="22x22/audio-volume-high.png">../../data/icons-22x22/audio-volume-high.png</file>
|
||||||
|
<file alias="22x22/folder.png">../../data/icons-22x22/folder.png</file>
|
||||||
|
<file alias="22x22/input-gaming.png">../../data/icons-22x22/input-gaming.png</file>
|
||||||
|
<file alias="22x22/preferences-system.png">../../data/icons-22x22/preferences-system.png</file>
|
||||||
|
<file alias="22x22/system-file-manager.png">../../data/icons-22x22/system-file-manager.png</file>
|
||||||
|
<file alias="22x22/video-display.png">../../data/icons-22x22/video-display.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -32,7 +32,7 @@ PathSettingWidget::PathSettingWidget(string &pathValue_, const char *labelText,
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathSettingWidget::selectPath(const string &newPath) {
|
void PathSettingWidget::selectPath(const string &newPath) {
|
||||||
pathValue = newPath;
|
pathValue = string() << newPath << "/";
|
||||||
updatePath();
|
updatePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,14 +10,26 @@ SettingsWindow::SettingsWindow() {
|
||||||
setWindowTitle("Configuration Settings");
|
setWindowTitle("Configuration Settings");
|
||||||
setMinimumSize(625, 360);
|
setMinimumSize(625, 360);
|
||||||
|
|
||||||
list = new QListWidget;
|
//use QTreeWidget instead of QListWidget, as only the former has setAllColumnsShowFocus()
|
||||||
list->addItem(video = new QListWidgetItem("Video"));
|
//this is needed to have the dotted-selection rectangle encompass the icons
|
||||||
list->addItem(audio = new QListWidgetItem("Audio"));
|
list = new QTreeWidget;
|
||||||
list->addItem(input = new QListWidgetItem("Input"));
|
list->addTopLevelItem(video = new QTreeWidgetItem(QStringList() << "Video"));
|
||||||
list->addItem(paths = new QListWidgetItem("Paths"));
|
list->addTopLevelItem(audio = new QTreeWidgetItem(QStringList() << "Audio"));
|
||||||
list->addItem(advanced = new QListWidgetItem("Advanced"));
|
list->addTopLevelItem(input = new QTreeWidgetItem(QStringList() << "Input"));
|
||||||
|
list->addTopLevelItem(paths = new QTreeWidgetItem(QStringList() << "Paths"));
|
||||||
|
list->addTopLevelItem(advanced = new QTreeWidgetItem(QStringList() << "Advanced"));
|
||||||
list->setCurrentItem(input); //select most frequently used panel by default
|
list->setCurrentItem(input); //select most frequently used panel by default
|
||||||
list->setFixedWidth(135);
|
list->setFixedWidth(135);
|
||||||
|
list->setHeaderHidden(true);
|
||||||
|
list->setRootIsDecorated(false);
|
||||||
|
list->setAllColumnsShowFocus(true);
|
||||||
|
list->setIconSize(QSize(22, 22));
|
||||||
|
|
||||||
|
video->setIcon(0, QIcon(":/22x22/video-display.png"));
|
||||||
|
audio->setIcon(0, QIcon(":/22x22/audio-volume-high.png"));
|
||||||
|
input->setIcon(0, QIcon(":/22x22/input-gaming.png"));
|
||||||
|
paths->setIcon(0, QIcon(":/22x22/folder.png"));
|
||||||
|
advanced->setIcon(0, QIcon(":/22x22/preferences-system.png"));
|
||||||
|
|
||||||
panel = new QWidget;
|
panel = new QWidget;
|
||||||
panel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
panel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
@ -44,13 +56,13 @@ SettingsWindow::SettingsWindow() {
|
||||||
panelLayout->addWidget(winAdvancedSettings->panel);
|
panelLayout->addWidget(winAdvancedSettings->panel);
|
||||||
panel->setLayout(panelLayout);
|
panel->setLayout(panelLayout);
|
||||||
|
|
||||||
connect(list, SIGNAL(currentRowChanged(int)), this, SLOT(listChanged()));
|
connect(list, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), this, SLOT(itemChanged()));
|
||||||
|
|
||||||
listChanged();
|
itemChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsWindow::listChanged() {
|
void SettingsWindow::itemChanged() {
|
||||||
QListWidgetItem *item = list->currentItem();
|
QTreeWidgetItem *item = list->currentItem();
|
||||||
|
|
||||||
if(item == video) panelLayout->setCurrentWidget(winVideoSettings->panel);
|
if(item == video) panelLayout->setCurrentWidget(winVideoSettings->panel);
|
||||||
if(item == audio) panelLayout->setCurrentWidget(winAudioSettings->panel);
|
if(item == audio) panelLayout->setCurrentWidget(winAudioSettings->panel);
|
||||||
|
|
|
@ -10,17 +10,17 @@ class SettingsWindow : public QbWindow {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QHBoxLayout *layout;
|
QHBoxLayout *layout;
|
||||||
QListWidget *list;
|
QTreeWidget *list;
|
||||||
QListWidgetItem *video;
|
QTreeWidgetItem *video;
|
||||||
QListWidgetItem *audio;
|
QTreeWidgetItem *audio;
|
||||||
QListWidgetItem *input;
|
QTreeWidgetItem *input;
|
||||||
QListWidgetItem *paths;
|
QTreeWidgetItem *paths;
|
||||||
QListWidgetItem *advanced;
|
QTreeWidgetItem *advanced;
|
||||||
QWidget *panel;
|
QWidget *panel;
|
||||||
QStackedLayout *panelLayout;
|
QStackedLayout *panelLayout;
|
||||||
|
|
||||||
SettingsWindow();
|
SettingsWindow();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void listChanged();
|
void itemChanged();
|
||||||
} *settingsWindow;
|
} *settingsWindow;
|
||||||
|
|
|
@ -6,11 +6,17 @@ ToolsWindow::ToolsWindow() {
|
||||||
setWindowTitle("Tools");
|
setWindowTitle("Tools");
|
||||||
setMinimumSize(625, 360);
|
setMinimumSize(625, 360);
|
||||||
|
|
||||||
list = new QListWidget;
|
list = new QTreeWidget;
|
||||||
list->addItem(cheatEditor = new QListWidgetItem("Cheat Editor"));
|
list->addTopLevelItem(cheatEditor = new QTreeWidgetItem(QStringList() << "Cheat Editor"));
|
||||||
list->addItem(stateManager = new QListWidgetItem("State Manager"));
|
list->addTopLevelItem(stateManager = new QTreeWidgetItem(QStringList() << "State Manager"));
|
||||||
list->setCurrentItem(cheatEditor);
|
list->setCurrentItem(cheatEditor);
|
||||||
list->setFixedWidth(135);
|
list->setFixedWidth(135);
|
||||||
|
list->setHeaderHidden(true);
|
||||||
|
list->setRootIsDecorated(false);
|
||||||
|
list->setAllColumnsShowFocus(true);
|
||||||
|
list->setIconSize(QSize(22, 22));
|
||||||
|
cheatEditor->setIcon(0, QIcon(":/22x22/accessories-text-editor.png"));
|
||||||
|
stateManager->setIcon(0, QIcon(":/22x22/system-file-manager.png"));
|
||||||
|
|
||||||
panel = new QWidget;
|
panel = new QWidget;
|
||||||
panel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
panel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
@ -30,13 +36,13 @@ ToolsWindow::ToolsWindow() {
|
||||||
panelLayout->addWidget(stateManagerWindow->panel);
|
panelLayout->addWidget(stateManagerWindow->panel);
|
||||||
panel->setLayout(panelLayout);
|
panel->setLayout(panelLayout);
|
||||||
|
|
||||||
connect(list, SIGNAL(currentRowChanged(int)), this, SLOT(listChanged()));
|
connect(list, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), this, SLOT(itemChanged()));
|
||||||
|
|
||||||
listChanged();
|
itemChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolsWindow::listChanged() {
|
void ToolsWindow::itemChanged() {
|
||||||
QListWidgetItem *item = list->currentItem();
|
QTreeWidgetItem *item = list->currentItem();
|
||||||
|
|
||||||
if(item == cheatEditor) panelLayout->setCurrentWidget(cheatEditorWindow->panel);
|
if(item == cheatEditor) panelLayout->setCurrentWidget(cheatEditorWindow->panel);
|
||||||
if(item == stateManager) panelLayout->setCurrentWidget(stateManagerWindow->panel);
|
if(item == stateManager) panelLayout->setCurrentWidget(stateManagerWindow->panel);
|
||||||
|
|
|
@ -6,9 +6,9 @@ class ToolsWindow : public QbWindow {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QHBoxLayout *layout;
|
QHBoxLayout *layout;
|
||||||
QListWidget *list;
|
QTreeWidget *list;
|
||||||
QListWidgetItem *cheatEditor;
|
QTreeWidgetItem *cheatEditor;
|
||||||
QListWidgetItem *stateManager;
|
QTreeWidgetItem *stateManager;
|
||||||
QWidget *panel;
|
QWidget *panel;
|
||||||
QStackedLayout *panelLayout;
|
QStackedLayout *panelLayout;
|
||||||
|
|
||||||
|
@ -17,5 +17,5 @@ public:
|
||||||
ToolsWindow();
|
ToolsWindow();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void listChanged();
|
void itemChanged();
|
||||||
} *toolsWindow;
|
} *toolsWindow;
|
||||||
|
|