summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/configure_debug.cpp
blob: f8ff804b2bb3dc920b277249767b8385fd875044 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2016 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#include "core/core.h"
#include "core/gdbstub/gdbstub.h" // TODO: can't include gdbstub without core.h
#include "core/settings.h"

#include "configure_debug.h"
#include "ui_configure_debug.h"

ConfigureDebug::ConfigureDebug(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ConfigureDebug)
{
    ui->setupUi(this);
    this->setConfiguration();
}

ConfigureDebug::~ConfigureDebug() {
    delete ui;
}

void ConfigureDebug::setConfiguration() {
    ui->toogleGDBStub->setChecked(Settings::values.use_gdbstub);
    ui->GDBPortSpinBox->setValue(Settings::values.gdbstub_port);
}

void ConfigureDebug::applyConfiguration() {
    GDBStub::ToggleServer(ui->toogleGDBStub->isChecked());
    Settings::values.use_gdbstub = ui->toogleGDBStub->isChecked();
    Settings::values.gdbstub_port = ui->GDBPortSpinBox->value();
}