mirror of https://github.com/mgba-emu/mgba.git
Qt: Add scale presets for up to 6x
This commit is contained in:
parent
ab5d40e451
commit
65a8a4e76b
1
CHANGES
1
CHANGES
|
@ -1,6 +1,7 @@
|
||||||
0.2.0: (Future)
|
0.2.0: (Future)
|
||||||
Features:
|
Features:
|
||||||
- Support for gamepad axes, e.g. analog sticks or triggers
|
- Support for gamepad axes, e.g. analog sticks or triggers
|
||||||
|
- Add scale presets for up to 6x
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
- Qt: Fix issue with set frame sizes being the wrong height
|
- Qt: Fix issue with set frame sizes being the wrong height
|
||||||
- Qt: Fix emulator crashing when full screen if a game is not running
|
- Qt: Fix emulator crashing when full screen if a game is not running
|
||||||
|
|
|
@ -490,30 +490,14 @@ void Window::setupMenu(QMenuBar* menubar) {
|
||||||
|
|
||||||
QMenu* avMenu = menubar->addMenu(tr("Audio/&Video"));
|
QMenu* avMenu = menubar->addMenu(tr("Audio/&Video"));
|
||||||
QMenu* frameMenu = avMenu->addMenu(tr("Frame size"));
|
QMenu* frameMenu = avMenu->addMenu(tr("Frame size"));
|
||||||
QAction* setSize = new QAction(tr("1x"), avMenu);
|
for (int i = 1; i <= 6; ++i) {
|
||||||
connect(setSize, &QAction::triggered, [this]() {
|
QAction* setSize = new QAction(tr("%1x").arg(QString::number(i)), avMenu);
|
||||||
showNormal();
|
connect(setSize, &QAction::triggered, [this, i]() {
|
||||||
resizeFrame(VIDEO_HORIZONTAL_PIXELS, VIDEO_VERTICAL_PIXELS);
|
showNormal();
|
||||||
});
|
resizeFrame(VIDEO_HORIZONTAL_PIXELS * i, VIDEO_VERTICAL_PIXELS * i);
|
||||||
frameMenu->addAction(setSize);
|
});
|
||||||
setSize = new QAction(tr("2x"), avMenu);
|
frameMenu->addAction(setSize);
|
||||||
connect(setSize, &QAction::triggered, [this]() {
|
}
|
||||||
showNormal();
|
|
||||||
resizeFrame(VIDEO_HORIZONTAL_PIXELS * 2, VIDEO_VERTICAL_PIXELS * 2);
|
|
||||||
});
|
|
||||||
frameMenu->addAction(setSize);
|
|
||||||
setSize = new QAction(tr("3x"), avMenu);
|
|
||||||
connect(setSize, &QAction::triggered, [this]() {
|
|
||||||
showNormal();
|
|
||||||
resizeFrame(VIDEO_HORIZONTAL_PIXELS * 3, VIDEO_VERTICAL_PIXELS * 3);
|
|
||||||
});
|
|
||||||
frameMenu->addAction(setSize);
|
|
||||||
setSize = new QAction(tr("4x"), avMenu);
|
|
||||||
connect(setSize, &QAction::triggered, [this]() {
|
|
||||||
showNormal();
|
|
||||||
resizeFrame(VIDEO_HORIZONTAL_PIXELS * 4, VIDEO_VERTICAL_PIXELS * 4);
|
|
||||||
});
|
|
||||||
frameMenu->addAction(setSize);
|
|
||||||
addAction(frameMenu->addAction(tr("Fullscreen"), this, SLOT(toggleFullScreen()), QKeySequence("Ctrl+F")));
|
addAction(frameMenu->addAction(tr("Fullscreen"), this, SLOT(toggleFullScreen()), QKeySequence("Ctrl+F")));
|
||||||
|
|
||||||
ConfigOption* lockAspectRatio = m_config->addOption("lockAspectRatio");
|
ConfigOption* lockAspectRatio = m_config->addOption("lockAspectRatio");
|
||||||
|
|
Loading…
Reference in New Issue