Take out some header includes
This commit is contained in:
parent
1a0d5030f9
commit
0abe271909
|
@ -14,16 +14,21 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <file/file_path.h>
|
#include <file/file_path.h>
|
||||||
|
#include <string/stdstring.h>
|
||||||
|
#include <retro_timers.h.>
|
||||||
|
|
||||||
#include "discord.h"
|
#include "discord.h"
|
||||||
#include "discord_register.h"
|
#include "discord_register.h"
|
||||||
|
|
||||||
|
#include "../deps/discord-rpc/include/discord_rpc.h"
|
||||||
|
|
||||||
#include "../retroarch.h"
|
#include "../retroarch.h"
|
||||||
#include "../configuration.h"
|
#include "../configuration.h"
|
||||||
#include "../core.h"
|
#include "../core.h"
|
||||||
#include "../core_info.h"
|
#include "../core_info.h"
|
||||||
#include "../paths.h"
|
#include "../paths.h"
|
||||||
#include "../playlist.h"
|
#include "../playlist.h"
|
||||||
|
#include "../verbosity.h"
|
||||||
|
|
||||||
#include "../msg_hash.h"
|
#include "../msg_hash.h"
|
||||||
|
|
||||||
|
@ -306,8 +311,10 @@ void discord_update(enum discord_presence presence)
|
||||||
break;
|
break;
|
||||||
case DISCORD_PRESENCE_GAME_PAUSED:
|
case DISCORD_PRESENCE_GAME_PAUSED:
|
||||||
discord_presence.smallImageKey = "paused";
|
discord_presence.smallImageKey = "paused";
|
||||||
discord_presence.smallImageText = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PAUSED);
|
discord_presence.smallImageText = msg_hash_to_str(
|
||||||
discord_presence.details = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME_PAUSED);
|
MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PAUSED);
|
||||||
|
discord_presence.details = msg_hash_to_str(
|
||||||
|
MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME_PAUSED);
|
||||||
pause_time = time(0);
|
pause_time = time(0);
|
||||||
ellapsed_time = difftime(time(0), start_time);
|
ellapsed_time = difftime(time(0), start_time);
|
||||||
discord_presence.startTimestamp = pause_time;
|
discord_presence.startTimestamp = pause_time;
|
||||||
|
@ -343,9 +350,11 @@ void discord_update(enum discord_presence presence)
|
||||||
ellapsed_time = 0;
|
ellapsed_time = 0;
|
||||||
|
|
||||||
discord_presence.smallImageKey = "playing";
|
discord_presence.smallImageKey = "playing";
|
||||||
discord_presence.smallImageText = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PLAYING);
|
discord_presence.smallImageText = msg_hash_to_str(
|
||||||
|
MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PLAYING);
|
||||||
discord_presence.startTimestamp = start_time;
|
discord_presence.startTimestamp = start_time;
|
||||||
discord_presence.details = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME);
|
discord_presence.details = msg_hash_to_str(
|
||||||
|
MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME);
|
||||||
|
|
||||||
discord_presence.state = label;
|
discord_presence.state = label;
|
||||||
discord_presence.instance = 0;
|
discord_presence.instance = 0;
|
||||||
|
|
|
@ -20,15 +20,8 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#include <boolean.h>
|
#include <boolean.h>
|
||||||
#include <string/stdstring.h>
|
|
||||||
#include <lists/string_list.h>
|
|
||||||
#include <retro_timers.h>
|
|
||||||
|
|
||||||
#include "../deps/discord-rpc/include/discord_rpc.h"
|
|
||||||
#include "verbosity.h"
|
|
||||||
|
|
||||||
enum discord_presence
|
enum discord_presence
|
||||||
{
|
{
|
||||||
|
@ -53,13 +46,13 @@ void discord_shutdown(void);
|
||||||
|
|
||||||
void discord_update(enum discord_presence presence);
|
void discord_update(enum discord_presence presence);
|
||||||
|
|
||||||
void discord_run_callbacks();
|
void discord_run_callbacks(void);
|
||||||
|
|
||||||
bool discord_is_ready();
|
bool discord_is_ready(void);
|
||||||
|
|
||||||
void discord_avatar_set_ready(bool ready);
|
void discord_avatar_set_ready(bool ready);
|
||||||
|
|
||||||
bool discord_avatar_is_ready();
|
bool discord_avatar_is_ready(void);
|
||||||
|
|
||||||
char* discord_get_own_username(void);
|
char* discord_get_own_username(void);
|
||||||
|
|
||||||
|
|
|
@ -293,6 +293,8 @@ bool glslang_parse_meta(const vector<string> &lines, glslang_meta *meta)
|
||||||
|
|
||||||
for (auto &line : lines)
|
for (auto &line : lines)
|
||||||
{
|
{
|
||||||
|
const char *line_c = line.c_str();
|
||||||
|
|
||||||
if (line.find("#pragma name ") == 0)
|
if (line.find("#pragma name ") == 0)
|
||||||
{
|
{
|
||||||
const char *str = NULL;
|
const char *str = NULL;
|
||||||
|
@ -303,7 +305,7 @@ bool glslang_parse_meta(const vector<string> &lines, glslang_meta *meta)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
str = line.c_str() + strlen("#pragma name ");
|
str = line_c + strlen("#pragma name ");
|
||||||
|
|
||||||
while (*str == ' ')
|
while (*str == ' ')
|
||||||
str++;
|
str++;
|
||||||
|
@ -312,7 +314,7 @@ bool glslang_parse_meta(const vector<string> &lines, glslang_meta *meta)
|
||||||
else if (line.find("#pragma parameter ") == 0)
|
else if (line.find("#pragma parameter ") == 0)
|
||||||
{
|
{
|
||||||
float initial, minimum, maximum, step;
|
float initial, minimum, maximum, step;
|
||||||
int ret = sscanf(line.c_str(), "#pragma parameter %63s \"%63[^\"]\" %f %f %f %f",
|
int ret = sscanf(line_c, "#pragma parameter %63s \"%63[^\"]\" %f %f %f %f",
|
||||||
id, desc, &initial, &minimum, &maximum, &step);
|
id, desc, &initial, &minimum, &maximum, &step);
|
||||||
|
|
||||||
if (ret == 5)
|
if (ret == 5)
|
||||||
|
@ -347,7 +349,7 @@ bool glslang_parse_meta(const vector<string> &lines, glslang_meta *meta)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RARCH_ERR("[slang]: Invalid #pragma parameter line: \"%s\".\n", line.c_str());
|
RARCH_ERR("[slang]: Invalid #pragma parameter line: \"%s\".\n", line_c);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -361,7 +363,7 @@ bool glslang_parse_meta(const vector<string> &lines, glslang_meta *meta)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
str = line.c_str() + strlen("#pragma format ");
|
str = line_c + strlen("#pragma format ");
|
||||||
|
|
||||||
while (*str == ' ')
|
while (*str == ' ')
|
||||||
str++;
|
str++;
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
|
/* RetroArch - A frontend for libretro.
|
||||||
|
* Copyright (C) 2010-2017 - Hans-Kristian Arntzen
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <spirv_glsl.hpp>
|
#include <spirv_glsl.hpp>
|
||||||
|
|
Loading…
Reference in New Issue