mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Header cleanups - don't include retroarch.h everywhere
This commit is contained in:
parent
074f19ca90
commit
0e3b478f8c
@ -30,7 +30,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#include "core_info.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include "core_option_manager.h"
|
||||
#include "msg_hash.h"
|
||||
#include "retroarch.h"
|
||||
|
||||
/*********************/
|
||||
/* Option Conversion */
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "paths.h"
|
||||
#include "retroarch.h"
|
||||
#include "runloop.h"
|
||||
#include "verbosity.h"
|
||||
#include "msg_hash.h"
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include <d3d8.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <d3d9.h>
|
||||
|
||||
#include "d3d_common.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define D3D9_DECL_FVF_TEXCOORD(stream, offset, index) \
|
||||
|
@ -35,9 +35,9 @@
|
||||
#include <dxgi.h>
|
||||
|
||||
#include "../../driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#ifdef HAVE_REWIND
|
||||
#include "../../state_manager.h"
|
||||
#endif
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include "../common/d3d_common.h"
|
||||
#include "../video_coord_array.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../dynamic.h"
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include "../include/Cg/cgD3D9.h"
|
||||
#include "../video_coord_array.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../dynamic.h"
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
|
||||
@ -66,7 +67,6 @@
|
||||
|
||||
#include "../../core.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#ifdef __WINRT__
|
||||
#error "UWP does not support D3D9"
|
||||
|
@ -47,7 +47,6 @@
|
||||
|
||||
#include "../../driver.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
#include "../common/gl1_common.h"
|
||||
|
@ -54,10 +54,10 @@
|
||||
#include "../../driver.h"
|
||||
#include "../../configuration.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#ifdef HAVE_REWIND
|
||||
#include "../../state_manager.h"
|
||||
#endif
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include "../video_coord_array.h"
|
||||
|
@ -49,8 +49,8 @@
|
||||
#ifdef HAVE_REWIND
|
||||
#include "../../state_manager.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include "../../verbosity.h"
|
||||
#include "../../record/record_driver.h"
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
#include <signal.h>
|
||||
#include <retroarch.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
@ -26,7 +25,6 @@
|
||||
#endif
|
||||
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -42,7 +42,6 @@
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../dynamic.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
|
||||
|
@ -41,7 +41,6 @@
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../dynamic.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../common/d3d10_common.h"
|
||||
|
||||
static void gfx_display_d3d10_blend_begin(void *data)
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../common/d3d11_common.h"
|
||||
|
||||
static void gfx_display_d3d11_blend_begin(void *data)
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../common/d3d12_common.h"
|
||||
|
||||
static void gfx_display_d3d12_blend_begin(void *data)
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../common/d3d_common.h"
|
||||
#include "../common/d3d8_common.h"
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../common/d3d_common.h"
|
||||
#include "../common/d3d9_common.h"
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../common/d3d_common.h"
|
||||
#include "../common/d3d9_common.h"
|
||||
|
||||
|
@ -21,8 +21,6 @@
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include "../../config.def.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../common/gl1_common.h"
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../common/gl2_common.h"
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
@ -24,8 +24,6 @@
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
|
||||
static const float gl3_vertexes[] = {
|
||||
0, 0,
|
||||
1, 0,
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#import "../common/metal_common.h"
|
||||
|
||||
static const float *gfx_display_metal_get_default_vertices(void)
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../common/vulkan_common.h"
|
||||
|
||||
/* Will do Y-flip later, but try to make it similar to GL. */
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../video_defines.h"
|
||||
#include "../common/gdi_common.h"
|
||||
#include "../common/win32_common.h"
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include "../video_shader_parse.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "slang_reflection.h"
|
||||
#include "glslang_util.h"
|
||||
|
||||
|
@ -22,9 +22,8 @@
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include "../retroarch.h"
|
||||
|
||||
#include "video_defines.h"
|
||||
#include "video_driver.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <formats/image.h>
|
||||
#include <gfx/math/matrix_4x4.h>
|
||||
|
||||
#include "../retroarch.h"
|
||||
#include "../gfx/font_driver.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "../file_path_special.h"
|
||||
#include "../paths.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
|
||||
#if defined(HAVE_GFX_WIDGETS)
|
||||
#include "gfx_widgets.h"
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "video_thread_wrapper.h"
|
||||
#include "font_driver.h"
|
||||
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
|
@ -52,8 +52,6 @@
|
||||
#include "../input_keymaps.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
/* Context has to be global as joypads also ride on this context. */
|
||||
LPDIRECTINPUT8 g_dinput_ctx;
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include "../input_keymaps.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
|
@ -42,7 +42,6 @@ extern "C" {
|
||||
#include "../input_keymaps.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct
|
||||
@ -130,17 +129,13 @@ static void winraw_destroy_window(HWND wnd)
|
||||
static BOOL winraw_set_keyboard_input(HWND window)
|
||||
{
|
||||
RAWINPUTDEVICE rid;
|
||||
settings_t *settings;
|
||||
|
||||
settings = config_get_ptr();
|
||||
|
||||
rid.dwFlags = window ? 0 : RIDEV_REMOVE;
|
||||
rid.hwndTarget = window;
|
||||
rid.usUsagePage = 0x01; /* Generic desktop */
|
||||
rid.usUsage = 0x06; /* Keyboard */
|
||||
settings_t *settings = config_get_ptr();
|
||||
rid.dwFlags = window ? 0 : RIDEV_REMOVE;
|
||||
rid.hwndTarget = window;
|
||||
rid.usUsagePage = 0x01; /* Generic desktop */
|
||||
rid.usUsage = 0x06; /* Keyboard */
|
||||
if (settings->bools.input_nowinkey_enable)
|
||||
rid.dwFlags |= RIDEV_NOHOTKEYS; /* Disable win keys while focused */
|
||||
|
||||
rid.dwFlags |= RIDEV_NOHOTKEYS; /* Disable win keys while focused */
|
||||
return RegisterRawInputDevices(&rid, 1, sizeof(RAWINPUTDEVICE));
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2015 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2011-2023 - 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-
|
||||
@ -29,7 +29,6 @@
|
||||
#include "../common/input_x11_common.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct x11_input
|
||||
|
@ -31,8 +31,9 @@
|
||||
#endif
|
||||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../gfx/video_driver.h"
|
||||
#include "../input_driver.h"
|
||||
#include "../input_keymaps.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "dinput_joypad.h"
|
||||
|
||||
|
@ -42,12 +42,9 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../config.def.h"
|
||||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../input_driver.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/video_driver.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include "dinput_joypad.h"
|
||||
|
@ -1,11 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include "../led_driver.h"
|
||||
#include "../led_defines.h"
|
||||
|
||||
#include "../../input/input_overlay.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -1,9 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include "../led_driver.h"
|
||||
#include "../led_defines.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_cbs.h"
|
||||
#include "../../msg_hash.h"
|
||||
#include "../../runloop.h"
|
||||
|
||||
#include "../../database_info.h"
|
||||
|
||||
|
@ -41,6 +41,8 @@
|
||||
#endif
|
||||
#include "../../performance_counters.h"
|
||||
#include "../../paths.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../verbosity.h"
|
||||
#ifdef HAVE_BLUETOOTH
|
||||
#include "../../bluetooth/bluetooth_driver.h"
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "../menu_cbs.h"
|
||||
#include "../../input/input_remapping.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../core_option_manager.h"
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
|
@ -52,6 +52,8 @@
|
||||
#include "../../audio/audio_driver.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../runtime_file.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../file_path_special.h"
|
||||
#include "../../list_special.h"
|
||||
|
||||
|
@ -35,6 +35,8 @@
|
||||
|
||||
#include "../../config.def.h"
|
||||
#include "../../file_path_special.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
|
||||
#ifdef HAVE_DISCORD_OWN_AVATAR
|
||||
#include "../../discord/discord.h"
|
||||
|
@ -52,6 +52,7 @@
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../file_path_special.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../gfx/drivers_font_renderer/bitmap.h"
|
||||
|
||||
#ifdef HAVE_LANGEXTRA
|
||||
|
@ -50,6 +50,8 @@
|
||||
|
||||
#include "../../core_info.h"
|
||||
#include "../../core.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
|
||||
#include "../../input/input_osk.h"
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "menu_driver.h"
|
||||
#include "menu_displaylist.h"
|
||||
#include "../file_path_special.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../core_info.h"
|
||||
#include "../configuration.h"
|
||||
|
||||
|
@ -46,9 +46,11 @@
|
||||
|
||||
#include "menu_driver.h"
|
||||
#include "menu_cbs.h"
|
||||
#include "../core_option_manager.h"
|
||||
#include "../driver.h"
|
||||
#include "../list_special.h"
|
||||
#include "../paths.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../tasks/task_powerstate.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "../verbosity.h"
|
||||
|
@ -25,10 +25,10 @@
|
||||
|
||||
#include "menu_driver.h"
|
||||
#include "menu_cbs.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../configuration.h"
|
||||
#include "../file_path_special.h"
|
||||
#include "../playlist.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../libretro-db/libretrodb.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <libretro.h>
|
||||
|
||||
#include "menu_defines.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../gfx/gfx_display.h"
|
||||
#include "../gfx/gfx_animation.h"
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <retro_assert.h>
|
||||
@ -67,7 +66,6 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define FFMPEG3 (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100))
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "../list_special.h"
|
||||
#include "../gfx/video_driver.h"
|
||||
#include "../paths.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
@ -67,71 +66,6 @@ const char* config_get_record_driver_options(void)
|
||||
return char_list_new_special(STRING_LIST_RECORD_DRIVERS, NULL);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* TODO/FIXME - not used apparently */
|
||||
static void find_record_driver(const char *prefix,
|
||||
bool verbosity_enabled)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
int i = (int)driver_find_index(
|
||||
"record_driver",
|
||||
settings->arrays.record_driver);
|
||||
|
||||
if (i >= 0)
|
||||
recording_state.driver = (const record_driver_t*)record_drivers[i];
|
||||
else
|
||||
{
|
||||
if (verbosity_enabled)
|
||||
{
|
||||
unsigned d;
|
||||
|
||||
RARCH_ERR("[Recording]: Couldn't find any %s named \"%s\".\n", prefix,
|
||||
settings->arrays.record_driver);
|
||||
RARCH_LOG_OUTPUT("Available %ss are:\n", prefix);
|
||||
for (d = 0; record_drivers[d]; d++)
|
||||
RARCH_LOG_OUTPUT("\t%s\n", record_drivers[d].ident);
|
||||
RARCH_WARN("[Recording]: Going to default to first %s...\n", prefix);
|
||||
}
|
||||
|
||||
recording_state.driver = (const record_driver_t*)record_drivers[0];
|
||||
|
||||
if (!recording_state.driver)
|
||||
retroarch_fail(1, "find_record_driver()");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ffemu_find_backend:
|
||||
* @ident : Identifier of driver to find.
|
||||
*
|
||||
* Finds a recording driver with the name @ident.
|
||||
*
|
||||
* Returns: recording driver handle if successful, otherwise
|
||||
* NULL.
|
||||
**/
|
||||
static const record_driver_t *ffemu_find_backend(const char *ident)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; record_drivers[i]; i++)
|
||||
{
|
||||
if (string_is_equal(record_drivers[i]->ident, ident))
|
||||
return record_drivers[i];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void recording_driver_free_state(void)
|
||||
{
|
||||
/* TODO/FIXME - this is not being called anywhere */
|
||||
recording_state.gpu_width = 0;
|
||||
recording_state.gpu_height = 0;
|
||||
recording_state.width = 0;
|
||||
recording_stte.height = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* gfx_ctx_init_first:
|
||||
* @param backend
|
||||
|
44
retroarch.c
44
retroarch.c
@ -700,14 +700,10 @@ char *path_get_ptr(enum rarch_path_type type)
|
||||
return p_rarch->path_content;
|
||||
case RARCH_PATH_DEFAULT_SHADER_PRESET:
|
||||
return p_rarch->path_default_shader_preset;
|
||||
case RARCH_PATH_BASENAME:
|
||||
return runloop_st->runtime_content_path_basename;
|
||||
case RARCH_PATH_CORE_OPTIONS:
|
||||
if (!path_is_empty(RARCH_PATH_CORE_OPTIONS))
|
||||
return p_rarch->path_core_options_file;
|
||||
break;
|
||||
case RARCH_PATH_SUBSYSTEM:
|
||||
return runloop_st->subsystem_path;
|
||||
case RARCH_PATH_CONFIG:
|
||||
if (!path_is_empty(RARCH_PATH_CONFIG))
|
||||
return p_rarch->path_config_file;
|
||||
@ -721,6 +717,11 @@ char *path_get_ptr(enum rarch_path_type type)
|
||||
case RARCH_PATH_NONE:
|
||||
case RARCH_PATH_NAMES:
|
||||
break;
|
||||
/* Runloop-related paths */
|
||||
case RARCH_PATH_BASENAME:
|
||||
return runloop_st->runtime_content_path_basename;
|
||||
case RARCH_PATH_SUBSYSTEM:
|
||||
return runloop_st->subsystem_path;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -737,14 +738,10 @@ const char *path_get(enum rarch_path_type type)
|
||||
return p_rarch->path_content;
|
||||
case RARCH_PATH_DEFAULT_SHADER_PRESET:
|
||||
return p_rarch->path_default_shader_preset;
|
||||
case RARCH_PATH_BASENAME:
|
||||
return runloop_st->runtime_content_path_basename;
|
||||
case RARCH_PATH_CORE_OPTIONS:
|
||||
if (!path_is_empty(RARCH_PATH_CORE_OPTIONS))
|
||||
return p_rarch->path_core_options_file;
|
||||
break;
|
||||
case RARCH_PATH_SUBSYSTEM:
|
||||
return runloop_st->subsystem_path;
|
||||
case RARCH_PATH_CONFIG:
|
||||
if (!path_is_empty(RARCH_PATH_CONFIG))
|
||||
return p_rarch->path_config_file;
|
||||
@ -758,6 +755,11 @@ const char *path_get(enum rarch_path_type type)
|
||||
case RARCH_PATH_NONE:
|
||||
case RARCH_PATH_NAMES:
|
||||
break;
|
||||
/* Runloop-related paths */
|
||||
case RARCH_PATH_BASENAME:
|
||||
return runloop_st->runtime_content_path_basename;
|
||||
case RARCH_PATH_SUBSYSTEM:
|
||||
return runloop_st->subsystem_path;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -833,6 +835,7 @@ bool path_set(enum rarch_path_type type, const char *path)
|
||||
strlcpy(p_rarch->path_content, path,
|
||||
sizeof(p_rarch->path_content));
|
||||
break;
|
||||
/* Runloop-related paths */
|
||||
case RARCH_PATH_BASENAME:
|
||||
runloop_st = runloop_state_get_ptr();
|
||||
strlcpy(runloop_st->runtime_content_path_basename, path,
|
||||
@ -924,6 +927,7 @@ void path_clear(enum rarch_path_type type)
|
||||
case RARCH_PATH_NONE:
|
||||
case RARCH_PATH_NAMES:
|
||||
break;
|
||||
/* Runloop-related paths */
|
||||
case RARCH_PATH_BASENAME:
|
||||
runloop_st = runloop_state_get_ptr();
|
||||
*runloop_st->runtime_content_path_basename = '\0';
|
||||
@ -1074,6 +1078,7 @@ void dir_clear(enum rarch_dir_type type)
|
||||
break;
|
||||
case RARCH_DIR_NONE:
|
||||
break;
|
||||
/* Runloop-related paths */
|
||||
case RARCH_DIR_CURRENT_SAVEFILE:
|
||||
runloop_st = runloop_state_get_ptr();
|
||||
*runloop_st->savefile_dir = '\0';
|
||||
@ -1138,6 +1143,7 @@ void dir_set(enum rarch_dir_type type, const char *path)
|
||||
break;
|
||||
case RARCH_DIR_NONE:
|
||||
break;
|
||||
/* Runloop-related paths */
|
||||
case RARCH_DIR_CURRENT_SAVEFILE:
|
||||
runloop_st = runloop_state_get_ptr();
|
||||
strlcpy(runloop_st->savefile_dir, path,
|
||||
@ -3357,10 +3363,6 @@ static void global_free(struct rarch_state *p_rarch)
|
||||
|
||||
retro_main_log_file_deinit();
|
||||
|
||||
runloop_st->flags &= ~(
|
||||
RUNLOOP_FLAG_IS_SRAM_LOAD_DISABLED
|
||||
| RUNLOOP_FLAG_IS_SRAM_SAVE_DISABLED
|
||||
| RUNLOOP_FLAG_USE_SRAM);
|
||||
#ifdef HAVE_PATCH
|
||||
p_rarch->flags &= ~(
|
||||
RARCH_FLAGS_BPS_PREF
|
||||
@ -3376,13 +3378,13 @@ static void global_free(struct rarch_state *p_rarch)
|
||||
| RUNLOOP_FLAG_REMAPS_GAME_ACTIVE
|
||||
| RUNLOOP_FLAG_REMAPS_CONTENT_DIR_ACTIVE);
|
||||
#endif
|
||||
|
||||
runloop_st->current_core.flags &= ~(RETRO_CORE_FLAG_HAS_SET_INPUT_DESCRIPTORS
|
||||
| RETRO_CORE_FLAG_HAS_SET_SUBSYSTEMS);
|
||||
|
||||
global = global_get_ptr();
|
||||
path_clear_all();
|
||||
dir_clear_all();
|
||||
runloop_st->flags &= ~(
|
||||
RUNLOOP_FLAG_IS_SRAM_LOAD_DISABLED
|
||||
| RUNLOOP_FLAG_IS_SRAM_SAVE_DISABLED
|
||||
| RUNLOOP_FLAG_USE_SRAM);
|
||||
runloop_st->current_core.flags &= ~(
|
||||
RETRO_CORE_FLAG_HAS_SET_INPUT_DESCRIPTORS
|
||||
| RETRO_CORE_FLAG_HAS_SET_SUBSYSTEMS);
|
||||
|
||||
if (!string_is_empty(runloop_st->name.remapfile))
|
||||
free(runloop_st->name.remapfile);
|
||||
@ -3395,6 +3397,10 @@ static void global_free(struct rarch_state *p_rarch)
|
||||
*runloop_st->name.cheatfile = '\0';
|
||||
*runloop_st->name.label = '\0';
|
||||
|
||||
global = global_get_ptr();
|
||||
path_clear_all();
|
||||
dir_clear_all();
|
||||
|
||||
if (global)
|
||||
memset(global, 0, sizeof(struct global));
|
||||
retroarch_override_setting_free_state();
|
||||
|
@ -146,12 +146,6 @@ unsigned int retroarch_get_rotation(void);
|
||||
|
||||
void retroarch_init_task_queue(void);
|
||||
|
||||
/* Creates folder and core options stub file for subsequent runs */
|
||||
bool core_options_create_override(bool game_specific);
|
||||
bool core_options_remove_override(bool game_specific);
|
||||
void core_options_reset(void);
|
||||
void core_options_flush(void);
|
||||
|
||||
enum rarch_state_flags
|
||||
{
|
||||
RARCH_FLAGS_HAS_SET_USERNAME = (1 << 0),
|
||||
|
@ -314,6 +314,12 @@ typedef struct runloop runloop_state_t;
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* Creates folder and core options stub file for subsequent runs */
|
||||
bool core_options_create_override(bool game_specific);
|
||||
bool core_options_remove_override(bool game_specific);
|
||||
void core_options_reset(void);
|
||||
void core_options_flush(void);
|
||||
|
||||
void runloop_path_fill_names(void);
|
||||
|
||||
/**
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "../configuration.h"
|
||||
#include "../file_path_special.h"
|
||||
#include "../list_special.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../input/input_driver.h"
|
||||
#include "../input/input_remapping.h"
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "../msg_hash.h"
|
||||
#include "../playlist.h"
|
||||
#include "../manual_content_scan.h"
|
||||
#include "../runloop.h"
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#ifdef HAVE_MENU
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "../gfx/gfx_widgets.h"
|
||||
#endif
|
||||
|
||||
#include "../core.h"
|
||||
#include "../defaults.h"
|
||||
#include "../command.h"
|
||||
#include "../configuration.h"
|
||||
|
@ -61,6 +61,7 @@ extern "C" {
|
||||
#include "../../../msg_hash.h"
|
||||
#include "../../../paths.h"
|
||||
#include "../../../retroarch.h"
|
||||
#include "../../../runloop.h"
|
||||
|
||||
#ifndef CXX_BUILD
|
||||
}
|
||||
|
@ -16,9 +16,6 @@ extern "C" {
|
||||
#include "../../../input/input_driver.h"
|
||||
#include "../../../input/input_remapping.h"
|
||||
#include "../../../network/netplay/netplay.h"
|
||||
#include "../../../retroarch.h"
|
||||
|
||||
#include "../../../verbosity.h"
|
||||
|
||||
#ifndef CXX_BUILD
|
||||
}
|
||||
|
@ -58,7 +58,6 @@ extern "C" {
|
||||
#include <queues/task_queue.h>
|
||||
|
||||
#include "../ui_companion_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#ifndef CXX_BUILD
|
||||
}
|
||||
|
@ -52,7 +52,6 @@
|
||||
#include "../../driver.h"
|
||||
#include "../../paths.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../frontend/drivers/platform_win32.h"
|
||||
|
||||
|
@ -22,9 +22,6 @@
|
||||
|
||||
#include "../driver.h"
|
||||
#include "../list_special.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
#include "ui_companion_driver.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user