Skip to content

Commit

Permalink
Header cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Jan 20, 2019
1 parent cfd7228 commit b13777e
Show file tree
Hide file tree
Showing 16 changed files with 169 additions and 88 deletions.
1 change: 1 addition & 0 deletions command.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
#include "managers/cheat_manager.h"
#include "managers/state_manager.h"
#include "ui/ui_companion_driver.h"
#include "tasks/task_content.h"
#include "tasks/tasks_internal.h"
#include "list_special.h"

Expand Down
1 change: 1 addition & 0 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "verbosity.h"
#include "lakka.h"

#include "tasks/task_content.h"
#include "tasks/tasks_internal.h"

#include "../list_special.h"
Expand Down
3 changes: 2 additions & 1 deletion frontend/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
#endif

#include "frontend.h"
#include "frontend_driver.h"
#include "../configuration.h"
#include "../ui/ui_companion_driver.h"
#include "../tasks/tasks_internal.h"
#include "../tasks/task_content.h"

#include "../driver.h"
#include "../paths.h"
Expand Down
2 changes: 1 addition & 1 deletion gfx/common/win32_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
#include "../../driver.h"
#include "../../paths.h"
#include "../../retroarch.h"
#include "../../tasks/task_content.h"
#include "../../tasks/tasks_internal.h"
#include "../../core_info.h"

#if !defined(_XBOX)

#include <commdlg.h>
#include <dbt.h>
#include "../../retroarch.h"
#include "../../input/input_driver.h"
#include "../../input/input_keymaps.h"
#include "../video_thread_wrapper.h"
Expand Down
1 change: 1 addition & 0 deletions menu/cbs/menu_cbs_ok.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#include "../../defaults.h"
#include "../../managers/core_option_manager.h"
#include "../../managers/cheat_manager.h"
#include "../../tasks/task_content.h"
#include "../../tasks/task_file_transfer.h"
#include "../../tasks/tasks_internal.h"
#include "../../input/input_remapping.h"
Expand Down
1 change: 1 addition & 0 deletions menu/drivers/ozone/ozone.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "../../../core_info.h"
#include "../../../core.h"
#include "../../../verbosity.h"
#include "../../../tasks/task_powerstate.h"
#include "../../../tasks/tasks_internal.h"
#include "../../../dynamic.h"

Expand Down
1 change: 1 addition & 0 deletions menu/drivers/xmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include "../../playlist.h"
#include "../../retroarch.h"

#include "../../tasks/task_powerstate.h"
#include "../../tasks/tasks_internal.h"

#include "../../cheevos/badges.h"
Expand Down
2 changes: 2 additions & 0 deletions network/netplay/netplay_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
#include "netplay_private.h"

#include "../../configuration.h"
#include "../../frontend/frontend_driver.h"
#include "../../input/input_driver.h"
#include "../../tasks/task_content.h"
#include "../../tasks/tasks_internal.h"
#include "../../file_path_special.h"
#include "../../paths.h"
Expand Down
1 change: 1 addition & 0 deletions retroarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
#include "managers/core_option_manager.h"
#include "managers/cheat_manager.h"
#include "managers/state_manager.h"
#include "tasks/task_content.h"
#include "tasks/tasks_internal.h"
#include "performance_counters.h"

Expand Down
1 change: 1 addition & 0 deletions tasks/task_content.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
#include "../cheevos/cheevos.h"
#endif

#include "task_content.h"
#include "tasks_internal.h"

#include "../command.h"
Expand Down
117 changes: 117 additions & 0 deletions tasks/task_content.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2017 - Higor Euripedes
* Copyright (C) 2011-2017 - 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 TASKS_HANDLER_CONTENT_H
#define TASKS_HANDLER_CONTENT_H

#include <stdint.h>

#include <boolean.h>
#include <retro_common_api.h>
#include <retro_miscellaneous.h>

#include <queues/task_queue.h>

#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif

#include "../content.h"
#include "../core_type.h"

RETRO_BEGIN_DECLS

enum content_mode_load
{
CONTENT_MODE_LOAD_NONE = 0,
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU,
CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU,
CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU
};

bool task_push_load_content_with_current_core_from_companion_ui(
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);

bool task_push_load_content_from_cli(
const char *core_path,
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);

bool task_push_load_new_core(
const char *core_path,
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);

bool task_push_start_builtin_core(content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);

bool task_push_start_current_core(content_ctx_info_t *content_info);

bool task_push_start_dummy_core(content_ctx_info_t *content_info);

bool task_push_load_content_with_new_core_from_companion_ui(
const char *core_path,
const char *fullpath,
const char *label,
content_ctx_info_t *content_info,
retro_task_callback_t cb,
void *user_data);

#ifdef HAVE_MENU
bool task_push_load_content_with_new_core_from_menu(
const char *core_path,
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);

bool task_push_load_content_from_playlist_from_menu(
const char *core_path,
const char *fullpath,
const char *label,
content_ctx_info_t *content_info,
retro_task_callback_t cb,
void *user_data);

bool task_push_load_content_with_core_from_menu(
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);
bool task_push_load_subsystem_with_core_from_menu(
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);
#endif

RETRO_END_DECLS

#endif
1 change: 1 addition & 0 deletions tasks/task_netplay_find_content.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <file/file_path.h>
#include <lists/dir_list.h>

#include "task_content.h"
#include "tasks_internal.h"
#include "../file_path_special.h"
#include "../verbosity.h"
Expand Down
37 changes: 37 additions & 0 deletions tasks/task_powerstate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2017 - Higor Euripedes
* Copyright (C) 2011-2017 - 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 TASK_POWER_STATE_H
#define TASK_POWER_STATE_H

#include <stdint.h>

#include <boolean.h>
#include <retro_common_api.h>
#include <retro_miscellaneous.h>

#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif

RETRO_BEGIN_DECLS

void task_push_get_powerstate(void);

enum frontend_powerstate get_last_powerstate(int *percent);

RETRO_END_DECLS

#endif
1 change: 1 addition & 0 deletions tasks/task_save.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "../network/netplay/netplay.h"
#endif

#include "../content.h"
#include "../core.h"
#include "../file_path_special.h"
#include "../configuration.h"
Expand Down
86 changes: 0 additions & 86 deletions tasks/tasks_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,8 @@

#include "../audio/audio_driver.h"

#include "../content.h"
#include "../core_type.h"

RETRO_BEGIN_DECLS

enum content_mode_load
{
CONTENT_MODE_LOAD_NONE = 0,
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU,
CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU,
CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU
};

#ifdef HAVE_NETWORKING
typedef struct
{
Expand Down Expand Up @@ -99,77 +88,6 @@ bool task_push_decompress(
retro_task_callback_t cb,
void *user_data);

bool task_push_load_content_with_current_core_from_companion_ui(
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);

bool task_push_load_content_from_cli(
const char *core_path,
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);

bool task_push_load_new_core(
const char *core_path,
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);

bool task_push_start_builtin_core(content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);

bool task_push_start_current_core(content_ctx_info_t *content_info);

bool task_push_start_dummy_core(content_ctx_info_t *content_info);

bool task_push_load_content_with_new_core_from_companion_ui(
const char *core_path,
const char *fullpath,
const char *label,
content_ctx_info_t *content_info,
retro_task_callback_t cb,
void *user_data);

#ifdef HAVE_MENU
bool task_push_load_content_with_new_core_from_menu(
const char *core_path,
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);

bool task_push_load_content_from_playlist_from_menu(
const char *core_path,
const char *fullpath,
const char *label,
content_ctx_info_t *content_info,
retro_task_callback_t cb,
void *user_data);

bool task_push_load_content_with_core_from_menu(
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);
bool task_push_load_subsystem_with_core_from_menu(
const char *fullpath,
content_ctx_info_t *content_info,
enum rarch_core_type type,
retro_task_callback_t cb,
void *user_data);
#endif

void task_file_load_handler(retro_task_t *task);

bool task_audio_mixer_load_handler(retro_task_t *task);
Expand Down Expand Up @@ -207,10 +125,6 @@ bool input_autoconfigure_get_swap_override(void);

void input_autoconfigure_joypad_reindex_devices(void);

void task_push_get_powerstate(void);

enum frontend_powerstate get_last_powerstate(int *percent);

bool task_push_audio_mixer_load_and_play(
const char *fullpath, retro_task_callback_t cb, void *user_data,
bool system,
Expand Down
1 change: 1 addition & 0 deletions ui/drivers/qt/ui_qt_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ extern "C" {
#include "../../../menu/menu_driver.h"
#endif
#include "../../../config.def.h"
#include "../../../tasks/task_content.h"
#include "../../../tasks/tasks_internal.h"
#include <string/stdstring.h>
#include <encodings/utf.h>
Expand Down

0 comments on commit b13777e

Please sign in to comment.