Skip to content
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

Native UI #4011

Merged
merged 2 commits into from Jan 17, 2018
Merged

Native UI #4011

merged 2 commits into from Jan 17, 2018

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Jan 1, 2018

First RSX PR of 2018 is here. Still WIP but its a long requested feature

  • Implements core for native user interface support in rpcs3
  • Implements save dialog with native UI

Things left to do

  • Implement message dialog and progress dialog (easy)
  • Implement trophy popup (easy)
  • Implement shader compiling notification (easy)
  • Properly handle failed initialization and fallback paths
  • Properly handle TTF search and loading as well as fallback paths. This is not implemented at all for linux atm.

Remaining tasks (outside scope of this bloated changeset)

  • Manage interface lifetimes outside of rsx::thread. They are not part of rsx core
  • Add support for interface stacking. Currently only one interface can be active at any one time

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 1, 2018

NOTE: You need some icons to make this code usable. Will provide some placeholders soon for testing.

@elad335
Copy link
Contributor

elad335 commented Jan 1, 2018

OMG kd I love you😍

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 1, 2018

Added some placeholder icons. Not ideal but at least we can find and quash bugs with them until we have something better.

P.S For testing, only save dialog is implemented right now

@Ekaseo
Copy link

Ekaseo commented Jan 1, 2018

tested it a little bit, loading the game with the UI works, saving is as before.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 1, 2018

You still get a Qt dialog to save? That should not be happening unless I'm missing a callback somewhere

@Ekaseo
Copy link

Ekaseo commented Jan 1, 2018

it happens in naruto ultimate ninja storm games, just tested ni no kuni, and it works there just fine. i will post the log file from naruto soon

@Ekaseo
Copy link

Ekaseo commented Jan 1, 2018

RPCS3.log.gz
nuns1

@Megamouse
Copy link
Contributor

Megamouse commented Jan 1, 2018

thats unrelated to the actual save dialog.
This is a normal message dialog which is not yet implemented

edit: see the to do list in the original comment

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 1, 2018

problem with normal dialogs is codepage support. Some games require japanese glyphs which may not be available in the font used for overlay causing missing characters. Nonetheless message dialog is on TODO list for this PR.

@Ekaseo
Copy link

Ekaseo commented Jan 1, 2018

oh, ok. My bad then.
sorry

@jjsat
Copy link
Contributor

jjsat commented Jan 1, 2018

Silent Hill 2 from the Silent Hill HD collection does not show the savedialog UI when loading from the main menu if OpenGL is used. Instead there is a black screen (the game fades to black before showing the dialog). There seems to be a small chance that the menu shows because I tried several times and it is displayed maybe every 10th attempt. With Vulkan the menu shows every time. When ingame the menu shows with both renderers.

Here is a Renderdoc capture of the black screen with OpenGL:
sh2_save_dialog.zip

And here is one where the menu was shown by chance:
sh2_save_dialog_ok.zip

Also: Nice work!

@M220
Copy link

M220 commented Jan 1, 2018

Hi kd!
Merry Christmas!
Can you do some small Save state backends for future development ( because now your messing with save things?! )

@liududu
Copy link

liududu commented Jan 1, 2018

Amazing shot kd-11!
Although there are a lot of bugs like When selecting save data in ToCS with Vulcan rendering.
It goes to an error a few second later the interface shows up.
default
Hope to be fixed :)

What's more,I am an Asian,and I prefer to use O as Select and X as Cancel
Could you consider to add an option in the settings to switch user controller manners?

Thanks a lot,and happy new year!

@Sunderland93
Copy link

This is instead of Qt interface?

@MSuih
Copy link
Member

MSuih commented Jan 1, 2018

@Sunderland93 This replaces the current message dialog windows (see @Ekaseo's comment) with in-emulator notifications.

@Sunderland93
Copy link

@MSuih, thanks

@greentop
Copy link

greentop commented Jan 1, 2018

The gcc build failed to complete for me in Ubuntu 16.04, and is the same error as reflected in Travis.
fatal error: overlays.h: No such file or directory compilation terminated.
There is a Overlays.h file that is present within that directory, but a copy & rename spat out another build error starting at build line 309:
pr4011 build ubuntu.gz

@M220
Copy link

M220 commented Jan 2, 2018

@Asinin3
Ok then :)
I was requesting some backends for save states like maybe a gui message and turned off option in the GUI for Save states but if you say so...
Thanks anyway and sorry :D

@Ristellise
Copy link

Ristellise commented Jan 2, 2018

Tales of Graces F:
Works well for OpenGL without or with strict Rending Mode,
However, when Attempting to load Game with Vulkan and Strict Rendering Mode, it frequently throws a runtime error: verification failed
Line 10698:
RPCS3.log
pn 2018-01-02 13 57 06 509

EDIT: Now it loads just fine with Vulkan and Strict Rendering Mode... weird...
EDIT2: Crashes about quite often with verification failed.

Some improvements:

  1. Able to hold down one arrow key to continue scrolling.
  2. Allow us to use our joysticks to scroll as well.
  3. New Save option should be placed on top instead at the bottom.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 2, 2018

@greentop Linux is not supported at the moment even if it builds. Largely due to finding ttf files on linux systems. I'll think of a workaround unencumbered by licensing or set up a conf scanning mechanism to the read font conf files

@SonofUgly
Copy link

SonofUgly commented Jan 3, 2018

Had a couple random crashes opening the save window on Dragon Quest Builders.
RPCS3.log.gz

What's more,I am an Asian,and I prefer to use O as Select and X as Cancel
Could you consider to add an option in the settings to switch user controller manners?

Autodetecting the game's region and switching it for JP games would be nice.

Also for icons, maybe it'd be best to original files by extracting them from the PS3's firmware when it gets installed. Button icons are in dev_flash\vsh\resource\hknw_plugin.rco and trophy icons are in dev_flash\vsh\resource\explore_plugin_full.rco. Open source RCO tool.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 3, 2018

Basic message prompts are now implemented. Confirm that they work. Progress dialogs are not yet done but will be implemented as soon as I have a good test case for more than one progress bar.

@liududu Loading of glyphs outside the basic ANSI set is not implemented. Usually these characters do not actually use the font selected but will fall back to a separate CJK glyph set. That means native UI is not compatible with CJK text atm.

As for autodetection of X and O, its better to have it as a separate option. Even with system set to JP I still prefer X to select and O to cancel as do some other users. Note that some titles will only run if system language is set to JP so its not trivial to just change that.

@MarioSonic2987
Copy link
Contributor

MarioSonic2987 commented Jan 3, 2018

image
It's working, but when it appears, generates two msg_dialogs: The Qt one and this new one. However, the new msg_dialog doesn't fade-out of the screen.

@MarioSonic2987
Copy link
Contributor

MarioSonic2987 commented Jan 3, 2018

image
In this one, I can't press X button, but if I click OK on Qt window, proceeds. Another issue is that some letters, like á and é in this screenshot, doesn't appear.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 3, 2018

Added support for progress bars but currently completely untested. If anyone can find a reliable test case please let me know so I can ensure the layout is working as intended.

@MarioSonic2987
Copy link
Contributor

image
This game uses a progress bar for checking trophies. The progress bar doesn't appear, but it does correctly the fade-out transition.

@jjsat
Copy link
Contributor

jjsat commented Jan 3, 2018

Dishonored uses two progress bars for its installation dialog. With the PR it displays none:
grafik
Before:
grafik

e: Here is the log:
RPCS3.log.gz

@MarioSonic2987
Copy link
Contributor

MarioSonic2987 commented Jan 3, 2018

msg_dialog works as intended in Saint Seiya: Brave Soldiers (only appears this one and fades-out correctly).

image

The issue with Saints Row 2 remains.

@toccata10
Copy link
Contributor

A bit more testing:
*vsync prevents these high fps peaks (and noise).
*pb of not seeing the messages is not game related: with OpenGl: it works fine. With Vulkan (radv): there's no message, no icon.

@ghost
Copy link

ghost commented Jan 13, 2018

@Kravickas excuse

@CesarAxe
Copy link

CesarAxe commented Jan 13, 2018

Excellent work!..
I tried with Saint Seiya Brave Soldiers [BLES01936] and gives the error:
F {rsx::thread} class std::runtime_error thrown: Verification failed:
(in file Emu\RSX\VK\VKGSRender.cpp:2948) during the game.
Edit: Only on FrameLimit: Auto
OpenGL, FrameLimit: 30 and 60 works well.

RPCS3.log.gz

@jjsat
Copy link
Contributor

jjsat commented Jan 13, 2018

For saves, it will almost never be a screenshot, just the game icon, from what I've seen looking at the code managing saves. Maybe the saves are broken on rpcs3, since only ICON0.PNG is ever loaded.

Games displaying individual image for the save game store it in icon0.png, so this should be fine. Examples for such games (which also use the VSH save menu) are Last of Us, MGS4, Dante's Inferno.

Edit: Something happened in the last commits (probably while introducing the automatic line breaking) that messes up some save captions with unnecessary line breaks that the UI also does not reserve space for.
grafik
grafik

It was fine before:
grafik

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 15, 2018

@jjsat Thats a really outdated build. Current ver is 7580. It should've been fixed some time back. Also, proper icon loading was added 3 days ago so I can tell you're on old code.

@jjsat
Copy link
Contributor

jjsat commented Jan 15, 2018

When building locally I get shown 6310 with your squashed commit (after your rebase just now it shows 6324). Tried with the appveyor artifact, same visual result. Wrong line breaks and only default icons.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 15, 2018

Oh boy, looks like I messed up a rebase somewhere and lost alot of progress. Back to square 1.

@kd-11 kd-11 force-pushed the ui_overlay branch 4 times, most recently from 5465b22 to 2a67368 Compare January 15, 2018 10:01
@kd-11
Copy link
Contributor Author

kd-11 commented Jan 15, 2018

I have reimplemented as much functionality as I can recall from the lost work. Save dialog should now appear as something much improved.

@janisozaur
Copy link
Contributor

@kd-11 you can use reflog to inspect state of your local git clone in a timeline fashion (not the usual DAG). If you have sent commits to GitHub, they should also be salvageable by going over the builds triggered on Travis/AppVeyor, checking their commits and navigating to said commits directly.

I'm not sure which ones in particular you would want, but here's a job from 2 days ago: https://travis-ci.org/RPCS3/rpcs3/builds/328438556 which uses this commit: 17dad2a which used 15065e6

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 15, 2018

The commits I was looking for were never pushed, I later found part of it on my linux installation. I had checked reflog and found nothing - its the first thing I check. Looking at the data though, it doesn't seem like I had lost much, in fact I like the new text metric handling code better.

@jjsat
Copy link
Contributor

jjsat commented Jan 15, 2018

Looks good now.
grafik

@kd-11 kd-11 force-pushed the ui_overlay branch 2 times, most recently from d57618f to b6b4bc5 Compare January 17, 2018 14:12
@kd-11
Copy link
Contributor Author

kd-11 commented Jan 17, 2018

I've tweaked the list view control to scroll properly and also draw partially visible entries. That's the last fix for this PR, the other issues will be fixed later and tracked in a separate ticket. The option to disable the use of this feature should fix any issues introduced here in the interim.

…logs

- includes some royalty free icons from opengameart and iconfinder
@kd-11 kd-11 merged commit 71f69d1 into RPCS3:master Jan 17, 2018
@kd-11 kd-11 mentioned this pull request Jan 17, 2018
4 tasks
@cheasea23 cheasea23 mentioned this pull request Jan 20, 2018
@Zusion Zusion mentioned this pull request Feb 10, 2018
@kd-11 kd-11 deleted the ui_overlay branch May 24, 2018 08:07
@0-Satanael 0-Satanael mentioned this pull request Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet