Almost all global settings wrapped in protective object to guarantee type safety and protect against tag spelling errors (I have found and corrected a lot of those!).

Joystick settings and burner configuration is not yet within the global object.
This commit is contained in:
Kjell Kernen
2014-02-17 23:47:40 +01:00
parent 2633b61433
commit c23a096a73
18 changed files with 204 additions and 1156 deletions
+2 -2
View File
@@ -3,6 +3,7 @@
#include <iostream>
#include "helpers.h"
#include "simulatorinterface.h"
#include "appdata.h"
#ifdef JOYSTICKS
#include "joystick.h"
#endif
@@ -179,8 +180,7 @@ void xsimulatorDialog::setupTimer()
void xsimulatorDialog::onButtonPressed(int value)
{
if (value==Qt::Key_Print) {
QSettings settings;
bool toclipboard=settings.value("snapshot_to_clipboard", false).toBool();
bool toclipboard=glob.snapshot_to_clipboard();
QString fileName ="";
if (!toclipboard) {
fileName = QString("screenshot-%1.png").arg(++screenshotIdx);