-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
discord: added new discord-rpc statuses & updated discord-rpc calls to stay more consistent #7089
Conversation
i've made several proposals discord.zip
if you are that nitpicky, i could make dolphin just a dolphin, bluemsx, use the b logo, and mgba can use the advance logo, since the gba has retrocompatibility, etc |
i would put this instead for dolphin discord-dolphin-ishiiruka.zip |
Just use the playlist icon when available. Otherwise fallback to a default icon for the core (I mean, a genesis pad for GPGX is more than enough to convey it's something SEGA) For instance super_nintendo works So I decided to announce the core name itself. Now what you need is... parametrization, let the user pick what they want show from a host of options, and add the required icons to the APP itself so all those options can be shown properly. |
@alfrix I suppose you're right that it doesn't need to be THAT specific on what platform the content is playing under. I appreciate your effort into porting over the XMB icons into the correct format as an example, 3 times even. I think going with the first example will be the best. @fr500 That's another good idea, I don't know why I thought of that, considering I even added a playlist check for the content name. Using the core name seems to be the only way to go about doing associating the icon with an asset name that discord will like. I just hope a solution will be made by the time we go over the 150 asset limit. |
We are currently using the monochrome batch with the monochrome dolphin of the second post. |
That’s great then! I’m at work, but when I get back I’ll commit the
required changes.
|
@alfrix Side note: are all of the monochrome icons plus the monochrome dolphin icon uploaded to the RetroArch RPC application? I probably should’ve asked earlier, but was short on time. |
they are, and should be working, i have tested a few and everything seemed ok |
@alfrix Some of the icons do not work because they're the wrong name. Examples include mednafen's cores. Please re-upload the icons with the names based on the "corename" attribute within the core's info file, not based on the filename of the info file. Spaces should become underscores and everything should be lowercased. An example of this would be "Beetle GBA" named as "beetle_gba". Remove base.png and rename RetroArch.png to base.png. That way, all of the icons will stay consistent. Make sure the other necessary assets are uploaded as well: playing.png, paused.png, and core.png namely. These can be found in the original zip file in the OP. I have pushed the necessary commits for this PR to function properly in upstream. Once you have re-uploaded the icons and renamed RetroArch to base, this PR can be merged. |
Uploaded the icons to https://github.com/alfrix/retroarch-discord-icons |
OK guys, how should we proceed here? What is the consensus on this? Can this PR be merged as-is, or are there still things that need to be addressed? Do some Discord icons still need to be updated as things stand, or are we good there? |
@twinaphex I didn't work on the icons last night because I came home very fatigued. I'll be sending in a PR to the repository @alfrix linked to fix the icons, and once the icons are up on RetroArch's official RPC application, this PR can be merged. |
OK. As soon as that happens, @alfrix can let me know so that I can update the Discord section again. |
It seems that i misnamed some of them, i made a custom discord app to test
the changes, but ran into a nasty segfault, i'll let you know when
everything is ready
```cpp
Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x000000000046385f in string_to_lower (s=0x0) at
libretro-common/string/stdstring.c:40
40 for ( ; *cs != '\0'; cs++)
(gdb) bt full
#0 0x000000000046385f in string_to_lower (s=0x0) at
libretro-common/string/stdstring.c:40
cs = 0x0
#1 0x0000000000a64098 in discord_update
(presence=DISCORD_PRESENCE_GAME) at discord/discord.c:106
system_name = 0x7fffee83853c <__GI___libc_free+76>
"H\203\304([]A\\A]\303f\017\037\204"
label = 0xffeee4da <error: No se puede acceder a la memoria en
la dirección 0xffeee4da>
current_playlist = 0x1620000009a
system = 0x10b66c0 <runloop_system>
core_info = 0x203d6d0
#2 0x00000000004457e7 in command_event (cmd=CMD_EVENT_DISCORD_UPDATE,
data=0x7fffffffdd90) at command.c:2926
userdata = 0x7fffffffdd90
discord_inited = true
boolean = false
#3 0x000000000043e22d in runloop_iterate (sleep_ms=0x7fffffffde60) at
retroarch.c:3422
userdata = {status = DISCORD_PRESENCE_GAME}
i = 5
input_nonblock_state = false
settings = 0x7fffdd527010
max_users = 5
#4 0x00000000005672c6 in ui_application_qt_run (args=0x0) at
ui/drivers/qt/ui_qt_application.cpp:178
ret = 1
sleep_ms = 14
#5 0x0000000000436419 in rarch_main (argc=1, argv=0x7fffffffdfe8,
data=0x0) at frontend/frontend.c:157
args = 0x0
ui_application = 0x10aeb20 <ui_application_qt>
#6 0x0000000000567344 in main (argc=1, argv=0x7fffffffdfe8) at
ui/drivers/qt/ui_qt_application.cpp:202
No locales.
```
El lun., 20 de ago. de 2018 a la(s) 09:58, Twinaphex (
notifications@github.com) escribió:
… OK. As soon as that happens, @alfrix <https://github.com/alfrix> can let
me know so that I can update the Discord section again.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7089 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABMIBT3Sb61kPvW2ZMeNpsVJyDKzMQ56ks5uSrKAgaJpZM4WCeQZ>
.
--
Alfredo Monclus
|
@alfrix I'm in the process of renaming them. There's also a few missing icons as well that I'm trying to figure out what to do with. For example: Daphne is a WIP core that's available on the nightly buildbot and has an info file, but doesn't have an icon. bNES is another one: it has an info file but it's not on the buildbot and you can't download it through RetroArch itself either. |
I just pushed a commit that converts any forward slashes in the |
BTW, please keep in mind that we only have a limited amount of icons left on Discord Developers page for Assets - 107 out of 150 max assets are already in use. |
@twinaphex All of those assets will be replaced by the icons we finalize. I am concerned about the limit, however. There may need be a hardcoded list within |
@twinaphex @alfrix The pull request has been submitted to https://github.com/alfrix/retroarch-discord-icons that renames every icon to its respective converted
|
Some of those test cores honestly don't matter all that much, and it would be a waste of icons since already we are rapidly running out of space (test SW, TestVulkan, etc). I repeat again, we cannot add any more icons beyond those 150 max assets. So the last thing we need to do here now is start adding icons for stuff that is not essential. |
@twinaphex Every icon that is currently on the RetroArch RPC application should/will be replaced with the renamed icons over at https://github.com/alfrix/retroarch-discord-icons. All 107 of the currently available assets on the RetroArch RPC application will be replaced with the 107 icons at that repository. The remaining 43 slots should be used for the cores that are available on the buildbot (in the list I listed in my previous comment). I am very concerned about the 150 limit; I'm also thinking about the future and cores that will eventually need icons. So, my thinking here is that any non-essential cores in the list above that have a buildbot build available should be hardcoded into As for essential cores in the list above that have a buildbot build available (like MAME's 2003-plus core), they should receive proper icons for their platform. In the end, for now we'll be well under the 150 limit. The reason for the hardcoded list is because of that limit. Thoughts? |
OK. Is it an option to talk with Discord devs to see if we can get an exemption for the max 150 assets limit based on our usecase/needs here? |
Temporarily until we get Discord's exemption from the 150 asset limit, non-essential cores with a missing icon that have a buildbot build available have been hardcoded into |
Why do you need an exemption? There aren't 150 different cores are there? I mean, there is at least 7 bsnes cores, and 4 snes9x cores, and 5 mame cores, just use the same icon for them. And... harcoding core names... really? that's really lame, that was one thing that was never compromised before. There wasn't a single core specific hack in the codebase. No idea why that is required, either, if you set an invalid imagekey the image is just blank. |
@fr500 If you're against the idea of hardcoding the core names temporarily, then do you have an alternative to the problem? I'm against the idea as well, but sometimes you need to go against what you want in order to make things work correctly. We need an exemption because in the future we will likely run out of the 150 assets slots that Discord allows an RPC application to have. 112 of those are currently going to be used. That number would be much higher if the core names that are hardcoded, weren't. The core names that are hardcoded are considered non-essential; they don't have an established platform and/or don't have an established icon. Almost all of them are game engines or tech demos. Since we don't have an icon for them right now, they use the standard "core" asset that we will use as a default asset, but uploading that same asset over and over just renamed to each specific core to the RPC application will bring us very close to that 150 asset limit. And what if we don't get that exemption? Then we're essentially wasting a bunch of asset slots for no real reason. The Discord RPC API doesn't allow a GET fetch of the assets of an RPC application, so we have no way of knowing what core icons are uploaded or not. Thus, brings us to hardcoded values. I want an alternative, but I don't have one. It would help if you read the comments of this PR; it would have saved me the trouble of me writing this and your frustration. EDIT: Also, the reason why an image is required is because the platform & core names are tied to a hover-over of the |
It's quite simple I did mention this in the first implementation actually, core name was a quick dirty hack
I think it should just have no icon for cores that have no icon, it's even fitting and will encourage people to contribute artwork. I'm not annoyed at you tbh, you're just doing some work, and I have no veto power over it. I don't merge or veto PRs. |
@fr500 Where would we get Having no icon for a core looks wrong when it's going from something that has an icon, like another core or the RetroArch menu. It's also not within Discord RPC's guidelines. I believe that a standard "core" asset like the rocket icon RetroArch is currently using is equally motivating for others to create unique icons for platforms/cores with no specific icon. |
If you would like an example of this inconsistency with core info files, Genesis Plus GX's Gear System's |
Well, no core specific hacks is some sort of intrinsic guideline we had too. You are free to pursue this path, I'm not on board with the idea but you don't need me to be. |
i was testing this and discord doesn't accept parenthesis ( ) which creates problems with some names, |
@fr500 Listen, I'm talking with you about this because I want everyone to come to an agreement. If someone's not happy, I'd rather fix that than just continue. That's why I'm asking for your input. Fixing core info files would also be a solution; I brought it up in the OP. I didn't go through with it because it requires modifying almost every core info file and I don't know how core info files are managed, whether they're all centralized in one place or not. If they are, then that should be the direction we should go in. I don't want to hardcode anything if I don't have to. |
usually @RobLoach makes the core_info changes at https://github.com/libretro/libretro-core-info |
Is that the master repository of all core info files? It also seems to be managed at https://github.com/libretro/libretro-super. How are they connected? When you update your info files via RetroArch, does it download from either of those repositories, or another mirror someplace else? |
Core Infos are just text assets, they are really inconsistent as you have
said. They are supposed to reflect the internal core information for
instance (for core name at least) and in many cases they don't. I think
this applies for many bsnes cores, and mupen GLES3 on android for instance.
I still think it's better to fix those than to add core specific
workarounds to the source.
…On Mon, Aug 20, 2018 at 7:31 PM Jesse Bryan ***@***.***> wrote:
@fr500 <https://github.com/fr500> Listen, I'm talking with you about this
because I want everyone to come to an agreement. If someone's not happy,
I'd rather fix that than just continue. That's why I'm asking for your
input.
Fixing core info files would also be a solution; I brought it up in the
OP. I didn't go through with it because it requires modifying almost every
core info file and I don't know how core info files are managed, whether
they're all centralized in one place or not. If they are, then that should
be the direction we should go in. I don't want to hardcode anything if I
don't have to.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7089 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABpC0K7mHia_MJpqE-BLJq0_Aluc1eqXks5uS1TxgaJpZM4WCeQZ>
.
|
Then I'd rather go with your solution, then. I'll work on updating all of the core information files, I just need to know which repository to do that with. Is it libretro-core-info, or is it libretro-super? |
the buildbot uses libretro-super at least.
…On Mon, Aug 20, 2018 at 7:49 PM Jesse Bryan ***@***.***> wrote:
Then I'd rather go with your solution, then. I'll work on updating all of
the core information files, I just need to know which repository to do that
with. Is it libretro-core-info, or is it libretro-super?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7089 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABpC0M_hnvDzBe5i7_CyCXllKWgH9XiWks5uS1kMgaJpZM4WCeQZ>
.
|
Ok, then I'll work with libretro-super unless told otherwise. I appreciate your input, I really do! |
Pull requests have been submitted to libretro/libretro-super#860 and alfrix/retroarch-discord-icons#3 to add the new attribute to all available info files with an established platform & icon, and to update all the current icons to support the new attribute. Once both PRs have been merged and the new icons have replaced all of the older icons on the official RetroArch RPC application, this PR can be merged. In the end, there should be 61 assets in total on the RPC application. @twinaphex @alfrix @fr500 Thoughts? |
core_info.c
Outdated
@@ -302,6 +303,14 @@ static core_info_list_t *core_info_list_new(const char *path, | |||
tmp = NULL; | |||
} | |||
|
|||
if (config_get_string(conf, "rpcname", &tmp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we could use rpcname
elsewhere... Seems similar to the systemname
, so possibly rename it to systemid
?
@RobLoach Seems like a good idea; it has been changed for a more wider use. |
general: added rpcname as an attribute for libretro/RetroArch#7089
This PR adds and changes a number of things in regards to RetroArch's discord-rpc implementation. Below is a list of the changes.
smallImage
field of the RPC widget.largeImage
field of the RPC widget.Not said in the above list is a temporary modification to the
largeImage
field to a standard "core" image (the rocket icon already available in RetroArch). The reasoning for this is explained in thediscord.c
file itself so anyone who attempts to contribute to the file will know about it. However, I will post the reasoning here as well, below.I would love to hear everyone's thoughts on this and any suggestions anyone might have.
Below is a showcase of the RPC widget in the form that this PR will provide.
Any feedback would be much appreciated.
Before this PR is merged, please ensure all assets are uploaded to RetroArch's official RPC application. Below is a zip of the assets required for this PR, at the least. All of the assets are correctly named.
images.zip
This PR request is related to #5690. @twinaphex @bparker06 @fr500