Rename screenshot.c to tasks/task_screenshot

This commit is contained in:
twinaphex 2016-05-17 14:31:33 +02:00
parent 5555d18a52
commit 146d2c8a1d
7 changed files with 16 additions and 53 deletions

View File

@ -176,7 +176,7 @@ OBJ += frontend/frontend.o \
core_info.o \
libretro-common/file/config_file.o \
config_file_userdata.o \
screenshot.o \
tasks/task_screenshot.o \
libretro-common/gfx/scaler/scaler.o \
gfx/drivers_shader/shader_null.o \
gfx/video_shader_driver.o \

View File

@ -49,7 +49,6 @@
#include "content.h"
#include "movie.h"
#include "general.h"
#include "screenshot.h"
#include "msg_hash.h"
#include "retroarch.h"
#include "managers/cheat_manager.h"

View File

@ -826,7 +826,7 @@ DATA RUNLOOP
/*============================================================
SCREENSHOTS
============================================================ */
#include "../screenshot.c"
#include "../tasks/task_screenshot.c"
/*============================================================
PLAYLISTS

View File

@ -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

View File

@ -13,6 +13,8 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
/* TODO/FIXME - turn this into actual task */
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@ -1784,7 +1786,6 @@ error:
return false;
}
/* TODO/FIXME - turn this into actual task */
#ifdef HAVE_MENU
static void menu_content_environment_get(int *argc, char *argv[],

View File

@ -14,6 +14,8 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
/* TODO/FIXME - turn this into actual task */
#ifdef _XBOX1
#include <xtl.h>
#include <xgraphics.h>
@ -28,6 +30,7 @@
#include <file/file_path.h>
#include <compat/strl.h>
#include <gfx/scaler/scaler.h>
#include <formats/rbmp.h>
@ -38,18 +41,14 @@
#define IMG_EXT "bmp"
#endif
#include "general.h"
#include "msg_hash.h"
#include "retroarch.h"
#include "screenshot.h"
#include "verbosity.h"
#include "../general.h"
#include "../msg_hash.h"
#include "gfx/video_driver.h"
#include "gfx/scaler/scaler.h"
#include "gfx/video_frame.h"
#include "../gfx/video_driver.h"
#include "../gfx/video_frame.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "../config.h"
#endif
/* Take frame bottom-up. */
@ -100,7 +99,6 @@ static bool screenshot_dump(const char *folder, const void *frame,
scaler_ctx_gen_reset(&scaler);
RARCH_LOG("Using RPNG for PNG screenshots.\n");
ret = rpng_save_image_bgr24(
filename,
out_buffer,
@ -124,8 +122,6 @@ static bool screenshot_dump(const char *folder, const void *frame,
pitch,
bmp_type);
#endif
if (!ret)
RARCH_ERR("Failed to take screenshot.\n");
return ret;
}
@ -258,14 +254,12 @@ static bool take_screenshot_choice(void)
**/
bool take_screenshot(void)
{
bool is_paused = runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL);
bool ret = take_screenshot_choice();
const char *msg_screenshot = ret
? msg_hash_to_str(MSG_TAKING_SCREENSHOT) :
msg_hash_to_str(MSG_FAILED_TO_TAKE_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);

View File

@ -139,6 +139,9 @@ void rarch_task_image_load_free(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
}
#endif