Skip to content

Conversation

@dantheman213
Copy link

Please see the pull request titled "easy import/export of roms and game saves for ios version" for the repo listed here:

https://github.com/hrydgard/ppsspp

This pull request is directly related to the parent pull request.

Please let me know if you have any questions or problems.

@dantheman213
Copy link
Author

Here is the related pull request from the parent project:
hrydgard/ppsspp#7881

@dantheman213
Copy link
Author

Sorry that's the old one --here is the new one:
hrydgard/ppsspp#7885

Copy link
Owner

Choose a reason for hiding this comment

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

Does this really need to be in UIScreen? Can we just implement it in the relevant screen classes in the main PPSSPP project?

@dantheman213
Copy link
Author

@hrydgard I was looking through the code and I wrote the new code based off where it seemed to make the most sense.

I also wanted the web server to be stopped automatically as soon as the Back button is pressed on the import/export rom screen. That way less resources are being used on the phone when the transfer server isn't being used as people can be forgetful.

If you think there is a better place to house the code changes I made here can you please be specific as to where I should make those changes? I'm sure you're more familiar with the ins and outs of the project than I am.

Thanks!

@hrydgard
Copy link
Owner

Sure, you simply need to add this function to the ImportExport screen class instead, not in this superclass.

@unknownbrackets
Copy link
Contributor

@dantheman213 Just to go into more detail:

https://github.com/hrydgard/ppsspp/pull/7885/files#diff-9c6d01ab53b5e80035c125d3bfe17c11R84

class ImportExportFilesScreen : public UIDialogScreenWithBackground {

This is the appropriate place to define ImportExportFilesScreen-specific methods. You would not expect NSArray methods to live on NSObject, would you? The methods aren't necessary for any types of screens other than ImportExporeFilesScreen objects.

It should have both of these methods:

    void AddStopServerBack(UI::ViewGroup *parent);
    UI::EventReturn OnBackServer(UI::EventParams &e);

None of the changes to native or MiscScreens.cpp/h should be necessary. Those changes belong in DevScreens.cpp/h or possibly ImportExportFilesScreen.cpp/h.

Also, this line:

parent->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, 64, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBackServer);

Would change to:

parent->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, 64, 10, NONE, NONE, 10)))->OnClick.Handle(this, &ImportExportFilesScreen::OnBackServer);

-[Unknown]

@dantheman213
Copy link
Author

Thanks for the tips. When I get some time I'll implement these and update the PPSSPP pull request.

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.

3 participants