From 5c98e27a97d92a4d959c073b41ffaa84fde42bfd Mon Sep 17 00:00:00 2001 From: "Mahmood(Thunder07)" Date: Sun, 9 Apr 2017 06:50:07 +0100 Subject: [PATCH] Add Screenshot feature to Unix --- Source/ui_unix/mainwindow.cpp | 11 +++++++++++ Source/ui_unix/mainwindow.h | 1 + build_unix/mainwindow.ui | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/Source/ui_unix/mainwindow.cpp b/Source/ui_unix/mainwindow.cpp index f3857060..07cc488e 100644 --- a/Source/ui_unix/mainwindow.cpp +++ b/Source/ui_unix/mainwindow.cpp @@ -19,6 +19,7 @@ #include #include "PreferenceDefs.h" +#include "ScreenShotUtils.h" #include "ui_mainwindow.h" #include "vfsmanagerdialog.h" @@ -459,3 +460,13 @@ void MainWindow::on_actionController_Manager_triggered() ControllerConfigDialog ccd; ccd.exec(); } + +void MainWindow::on_actionCapture_Screen_triggered() +{ + CScreenShotUtils::TriggerGetScreenshot(g_virtualMachine, + [&](int res, const char* msg)->void + { + m_msgLabel->setText(msg); + } + ); +} diff --git a/Source/ui_unix/mainwindow.h b/Source/ui_unix/mainwindow.h index 9bde179f..e8745b31 100644 --- a/Source/ui_unix/mainwindow.h +++ b/Source/ui_unix/mainwindow.h @@ -97,6 +97,7 @@ private slots: void on_actionMemory_Card_Manager_triggered(); void on_actionVFS_Manager_triggered(); void on_actionController_Manager_triggered(); + void on_actionCapture_Screen_triggered(); }; #endif // MAINWINDOW_H diff --git a/build_unix/mainwindow.ui b/build_unix/mainwindow.ui index f8607d49..33573646 100644 --- a/build_unix/mainwindow.ui +++ b/build_unix/mainwindow.ui @@ -85,6 +85,8 @@ + + @@ -181,6 +183,11 @@ Controller Manager... + + + Capture Screen + +