8000 UWP Improvements by basharast · Pull Request #17350 · hrydgard/ppsspp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

UWP Improvements #17350

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

Merged
merged 21 commits into from
Aug 14, 2023
Merged

UWP Improvements #17350

merged 21 commits into from
Aug 14, 2023

Conversation

basharast
Copy link
Contributor
@basharast basharast commented Apr 28, 2023

Hi,

Here a suggested changes to improve the UWP version

changes were carefully added to avoid breaking other platforms, it will be applied only for UWP

I don't know what is used exactly in libretro core, so all changes excluded from libretro build

Main changes

  • Custom memory stick location
  • Launch options (File, URI)
  • UWP storage layer manager

these changes may address: #15595 & #16423

Custom memory stick

I used the same UI in Android to make user able to change the location to another place

I did my best to enable this feature without breaking anything else.

MStick

Launch options

  • User can now launch PPSSPP (UWP) using file
  • or using URI ppsspp: with support to switch back to the caller
    ppsspp:?cmd="fullpath" or ppsspp:?cmd="fullpath"&launchOnExit=targetURI

UWP storage layer

Major part of this layer pulled out due to not required by latest windows builds, only builds before 10.0.17134

Features enabled

I enabled some features to make it almost similar to the desktop version such as browse folder

now it will generate logs near to inside PSP folder inside LOGS folder (not sure if this was enabled before but in case it wasn't)

Need to more work [Solved]

Some places still can be better, like the way to detect launch request

I didn't find a better and effective place other than Render (loop) to keep track these requests

it need to be moved to proper place in future.

I hope you will find it easy to check and helpful

already tested on XBOX, Desktop without any problem.

Thanks.

@hrydgard
Copy link
Owner

This is really cool, thanks for doing this!

I'll review it in a bit more detail tomorrow, and will probably end up merging it after the 1.15 release process (we don't yet do official UWP releases anyway).

@hrydgard hrydgard added this to the v1.16.0 milestone Apr 28, 2023
Copy link
Owner
@hrydgard hrydgard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round of comments!

Also, I'm wondering if all those libretro checks is needed in callers - maybe it's possible to have the storagemanager use dummy implementations in libretro mode, or something.

@basharast
Copy link
Contributor Author

Thanks man, I really appreciate your time to check this PR,
applying the changes now, will submit them later today.
as for (string functions/helpers) I'm in very early stage in C/C++ it wasn't easy to learn that and understand the project structure in short time,
so I forgot to look in the code for possible matches, I noticed that later after I finished, I will replace these as well.
and yeah libretro check better to be moved to the storage manager instead of the current case.

@basharast
Copy link
Contributor Author
basharast commented Apr 30, 2023

So apparently I had few things mixed up due to the old builds of windows and lack of information in MS docs
We actually don't need to go through the slow UWP async functions
once the folder/file is added to the future access list then:

API direct access

it will be allowed for direct access using the API that made for UWP (those ends with FromApp)
this is allowed even without FileSystem enabled.

Get StorageFile with full path

also functions such as StorageFolder::GetFolderFromPathAsync allowed to get files from outside local data
as long the target in the future access list

Code formating

for some reason in VS lines look aligned and good, but in github some of them appear not aligned.

PR

I had to pull out many changes, let me know if I should re-submit another pull and close this in case this going to cause confusing.

8000

@ghost
Copy link
ghost commented Apr 30, 2023

Code formating

for some reason in VS lines look aligned and good, but in github some of them appear not aligned.

The good old tabs vs spaces indentation issue, in GitHub a tab is equal to around 8 spaces (IIRC) while in Visual Studio a tab is much less than that. It's kind of annoying to deal with but you get used to it once you know about this.

basharast added 8 commits May 3, 2023 13:04
- Fixed freespace value
- added back BOOTABLE case to BROWSE_FOR_FILE
- Fixed fake folder info
- Fixed some code formating
Path preview can actually solved within ToVisualString without creating another function, I feel it will cause confusing as both function will be similar.
@basharast basharast requested a review from hrydgard May 24, 2023 21:28
@hrydgard
Copy link
Owner

I'll take another look soon, sorry for the long, long delay!

Replacing NativeMessageReceived with System_PostUIMessage
@basharast
Copy link
Contributor Author

I'll take another look soon, sorry for the long, long delay!

No problem at all, take your time, let me know if there will be any further changes
Many thanks :)

- Better handling for launch items
- Resolved code conflicts
This was wrapped before with `#if PPSSPP_PLATFORM(ANDROID)` after it got removed now start to appear in UWP, this should fix it.
@hrydgard
Copy link
Owner

Alright, this is looking really good now, there are some nice fixes here.

Just wondering why indentation is now inconsistent betwee different XML files - some get their tabbing changed in this PR, making diffs hard to read (sure, there are workaround but still) and some don't.

With that fixed, I'm happy to merge.

@basharast
Copy link
Contributor Author
basharast commented Aug 14, 2023

Just wondering why indentation is now inconsistent betwee different XML files - some get their tabbing changed in this PR, making diffs hard to read (sure, there are workaround but still) and some don't.

Those are 'manifest' files, lines were aligned with spaces instead of tabs, so now they look different
I used VS auto formatting and it fixed and aligned the lines again with tabs instead

Old manifest
New manifest

Hope they are better now after this commit

@hrydgard
Copy link
Owner

When looking at the overall PR diff, I still see them with a formatting change. But eh, it's not that important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0