-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[UWP] Improvements 2 (Configs, Render, Input) #17952
Conversation
…into configs-loading
@basharast Please link issue #17639 to this PR so that when it is merged the issue is closed automatically. You can do this by just typing "Fixes #17639" into any part of the PR's description. |
Ah nice thanks for the test, yeah as mention in the details at the end, I prepared the events to show/hide the OSK, but need to be linked with the UI text edit (focus state), so I hope this will be easy to be implemented |
Really good stuff! I think at least on Xbox, we should hide Microsoft Basic Render Driver, though. I think we can get this in even without the on-screen keyboard working on XBox, and fix that later. What do you think @basharast , or do you plan to make an attempt right away? |
The only reason I want to implement the focus got/lost event for text edit is to avoid I will try to do this, and see how it can be better asap |
I just updated the code to support the OSK case with few improvements, I hope I covered most cases, @GABO1423 could you please test this if it works fine on Xbox. |
Sorry for the late response, I'll make a build and test this in a bit, until then please hold off from merging this PR. |
I won't merge until I get green light from both of you, don't worry :) |
Sad news, OSK is not working. In fact, trying to use it only causes the app to freeze, softlocking the app and requiring the user to close it. Another issue I found is Menu sounds do not work anymore, but I would have to test further to see if this PR caused the issue or if it was a regression from another commit. |
No problem, probably need a few changes.. it's almost done, I will try to manage to test this in someway directly, will check the menu sounds if there is something wrong soon. |
I did some quick bisecting, and it seems that the issue is indeed caused by this PR. So at the very least it was not a regression from another commit. Should make narrowing down the issue a bit easier. |
True, actually this line should be called before configs load // Get install location
auto packageDirectory = Package::Current->InstalledPath;
const Path& exePath = Path(FromPlatformString(packageDirectory));
g_VFS.Register("", new DirectoryReader(exePath / "Content"));
g_VFS.Register("", new DirectoryReader(exePath));
// Mount a filesystem
g_Config.flash0Directory = exePath / "assets/flash0"; I didn't move it to the new initial function |
+UI sounds fix
I think it freeze because of this line: if (IsXBox()) {
return InputPane::GetForCurrentView()->Visible;
} this may need to be called from UI thread, |
Making a build to do just that right now. |
After a lot of work over at Discord, we finally made the OSK work! So when the relevant commits are pushed, this PR is ready to go. |
- Renamed few functions to avoid confusion - Now UI will report text (gotfocus, lostfocus), popup_closed to the frontend - Both cases (DPad, Keyboard) covered
As mentioned we reached a stable state, many thanks to @GABO1423 for his time it wasn't possible without testing on real XBox, PR descriptions updated. |
Removing unused include and cleaned the Tls TODO notice
Very cool, nice work guys! |
Hi, this is the second (phase2 of PR17350), almost last PR for UWP
(PR 17350 was not mentioned in the release log so I'm linking it here for future tracking)
this PR will address the following issues:
Initialize
Render device
DeviceResources.cpp
Screenshot
Post shaders
Read the it at TlsAlloc Remarks
Screenshot
Input keyboard
true
, it has actual check nowScreenshot
Plus other minor fixes.
HWK & OSK
So now we can support Hardware keyboard and on-screen keyboard
the changes made on the UI was to add UI-Notification whenever:
text_gotfocus
text_lostfocus
popup_closed
With those events the front end was able to manage Input pane and to forward chars to the
NativeKey
when requiredon XBox it's a bit complicated because input could be DPad or Keyboard, but thankfully done.
Related issues
Fixes #17639
Hope you will find this PR helpful,
Many thanks.