mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Rename screenshot.c to tasks/task_screenshot
This commit is contained in:
parent
5555d18a52
commit
146d2c8a1d
@ -176,7 +176,7 @@ OBJ += frontend/frontend.o \
|
|||||||
core_info.o \
|
core_info.o \
|
||||||
libretro-common/file/config_file.o \
|
libretro-common/file/config_file.o \
|
||||||
config_file_userdata.o \
|
config_file_userdata.o \
|
||||||
screenshot.o \
|
tasks/task_screenshot.o \
|
||||||
libretro-common/gfx/scaler/scaler.o \
|
libretro-common/gfx/scaler/scaler.o \
|
||||||
gfx/drivers_shader/shader_null.o \
|
gfx/drivers_shader/shader_null.o \
|
||||||
gfx/video_shader_driver.o \
|
gfx/video_shader_driver.o \
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
#include "content.h"
|
#include "content.h"
|
||||||
#include "movie.h"
|
#include "movie.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
#include "screenshot.h"
|
|
||||||
#include "msg_hash.h"
|
#include "msg_hash.h"
|
||||||
#include "retroarch.h"
|
#include "retroarch.h"
|
||||||
#include "managers/cheat_manager.h"
|
#include "managers/cheat_manager.h"
|
||||||
|
@ -826,7 +826,7 @@ DATA RUNLOOP
|
|||||||
/*============================================================
|
/*============================================================
|
||||||
SCREENSHOTS
|
SCREENSHOTS
|
||||||
============================================================ */
|
============================================================ */
|
||||||
#include "../screenshot.c"
|
#include "../tasks/task_screenshot.c"
|
||||||
|
|
||||||
/*============================================================
|
/*============================================================
|
||||||
PLAYLISTS
|
PLAYLISTS
|
||||||
|
34
screenshot.h
34
screenshot.h
@ -1,34 +0,0 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
|
||||||
*
|
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
||||||
* of the GNU General Public License as published by the Free Software Found-
|
|
||||||
* ation, either version 3 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __RARCH_SCREENSHOT_H
|
|
||||||
#define __RARCH_SCREENSHOT_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <boolean.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool take_screenshot(void);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -13,6 +13,8 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* TODO/FIXME - turn this into actual task */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -1784,7 +1786,6 @@ error:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO/FIXME - turn this into actual task */
|
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
static void menu_content_environment_get(int *argc, char *argv[],
|
static void menu_content_environment_get(int *argc, char *argv[],
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* TODO/FIXME - turn this into actual task */
|
||||||
|
|
||||||
#ifdef _XBOX1
|
#ifdef _XBOX1
|
||||||
#include <xtl.h>
|
#include <xtl.h>
|
||||||
#include <xgraphics.h>
|
#include <xgraphics.h>
|
||||||
@ -28,6 +30,7 @@
|
|||||||
|
|
||||||
#include <file/file_path.h>
|
#include <file/file_path.h>
|
||||||
#include <compat/strl.h>
|
#include <compat/strl.h>
|
||||||
|
#include <gfx/scaler/scaler.h>
|
||||||
|
|
||||||
#include <formats/rbmp.h>
|
#include <formats/rbmp.h>
|
||||||
|
|
||||||
@ -38,18 +41,14 @@
|
|||||||
#define IMG_EXT "bmp"
|
#define IMG_EXT "bmp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "general.h"
|
#include "../general.h"
|
||||||
#include "msg_hash.h"
|
#include "../msg_hash.h"
|
||||||
#include "retroarch.h"
|
|
||||||
#include "screenshot.h"
|
|
||||||
#include "verbosity.h"
|
|
||||||
|
|
||||||
#include "gfx/video_driver.h"
|
#include "../gfx/video_driver.h"
|
||||||
#include "gfx/scaler/scaler.h"
|
#include "../gfx/video_frame.h"
|
||||||
#include "gfx/video_frame.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "../config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Take frame bottom-up. */
|
/* Take frame bottom-up. */
|
||||||
@ -100,7 +99,6 @@ static bool screenshot_dump(const char *folder, const void *frame,
|
|||||||
|
|
||||||
scaler_ctx_gen_reset(&scaler);
|
scaler_ctx_gen_reset(&scaler);
|
||||||
|
|
||||||
RARCH_LOG("Using RPNG for PNG screenshots.\n");
|
|
||||||
ret = rpng_save_image_bgr24(
|
ret = rpng_save_image_bgr24(
|
||||||
filename,
|
filename,
|
||||||
out_buffer,
|
out_buffer,
|
||||||
@ -124,8 +122,6 @@ static bool screenshot_dump(const char *folder, const void *frame,
|
|||||||
pitch,
|
pitch,
|
||||||
bmp_type);
|
bmp_type);
|
||||||
#endif
|
#endif
|
||||||
if (!ret)
|
|
||||||
RARCH_ERR("Failed to take screenshot.\n");
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -258,14 +254,12 @@ static bool take_screenshot_choice(void)
|
|||||||
**/
|
**/
|
||||||
bool take_screenshot(void)
|
bool take_screenshot(void)
|
||||||
{
|
{
|
||||||
|
bool is_paused = runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL);
|
||||||
bool ret = take_screenshot_choice();
|
bool ret = take_screenshot_choice();
|
||||||
const char *msg_screenshot = ret
|
const char *msg_screenshot = ret
|
||||||
? msg_hash_to_str(MSG_TAKING_SCREENSHOT) :
|
? msg_hash_to_str(MSG_TAKING_SCREENSHOT) :
|
||||||
msg_hash_to_str(MSG_FAILED_TO_TAKE_SCREENSHOT);
|
msg_hash_to_str(MSG_FAILED_TO_TAKE_SCREENSHOT);
|
||||||
const char *msg = msg_screenshot;
|
const char *msg = msg_screenshot;
|
||||||
bool is_paused = runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL);
|
|
||||||
|
|
||||||
RARCH_LOG("%s.\n", msg);
|
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 1, is_paused ? 1 : 180, true);
|
runloop_msg_queue_push(msg, 1, is_paused ? 1 : 180, true);
|
||||||
|
|
@ -139,6 +139,9 @@ void rarch_task_image_load_free(retro_task_t *task);
|
|||||||
|
|
||||||
void rarch_task_file_load_handler(retro_task_t *task);
|
void rarch_task_file_load_handler(retro_task_t *task);
|
||||||
|
|
||||||
|
/* TODO/FIXME - turn this into actual task */
|
||||||
|
bool take_screenshot(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user