mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-15 23:40:29 +02:00
Allow taking screenshots in the app menu
This commit is contained in:
1 parent
e0e96200b9
commit
d21fef52ae
8 files changed
+34
-19
No files matched your search
+3
-3
@@ -968,7 +968,7 @@ void NativeShutdownGraphics() {
|
||||
INFO_LOG(SYSTEM, "NativeShutdownGraphics done");
|
||||
}
|
||||
|
||||
static void TakeScreenshot() {
|
||||
static void TakeScreenshot(Draw::DrawContext *draw) {
|
||||
Path path = GetSysDirectory(DIRECTORY_SCREENSHOT);
|
||||
if (!File::Exists(path)) {
|
||||
File::CreateDir(path);
|
||||
@@ -991,7 +991,7 @@ static void TakeScreenshot() {
|
||||
i++;
|
||||
}
|
||||
|
||||
bool success = TakeGameScreenshot(filename, g_Config.bScreenshotsAsPNG ? ScreenshotFormat::PNG : ScreenshotFormat::JPG, SCREENSHOT_OUTPUT);
|
||||
bool success = TakeGameScreenshot(draw, filename, g_Config.bScreenshotsAsPNG ? ScreenshotFormat::PNG : ScreenshotFormat::JPG, SCREENSHOT_OUTPUT);
|
||||
if (success) {
|
||||
g_OSD.Show(OSDType::MESSAGE_FILE_LINK, filename.ToString(), 0.0f, "screenshot_link");
|
||||
if (System_GetPropertyBool(SYSPROP_CAN_SHOW_FILE)) {
|
||||
@@ -1012,7 +1012,7 @@ static void TakeScreenshot() {
|
||||
|
||||
void CallbackPostRender(UIContext *dc, void *userdata) {
|
||||
if (g_TakeScreenshot) {
|
||||
TakeScreenshot();
|
||||
TakeScreenshot(dc->GetDrawContext());
|
||||
g_TakeScreenshot = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user