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

Add Playstation Vita Support #14

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

sharkwouter
Copy link

This PR makes it possible to build Panel-Pop for the Playstation Vita. It will only work on modded Playstation Vitas, but modding them is easy and legal. It does incorporate the change from my previous PR which makes the configuration file a json file. This made it much easier for me to implement on the Vita than with Boost.

@sharkwouter sharkwouter changed the title Vita dolce Add Playstation Vita Support Dec 12, 2020
@sharkwouter
Copy link
Author

Feel free to squish this PR if you plan on merging it.

std::ifstream configFile;
std::string configPath = CONFIG_DIR + CONFIG_FILENAME;
configFile.open(configPath, std::ios::in);
#ifdef __vita__
Copy link
Owner

Choose a reason for hiding this comment

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

Could the saving implementation maybe be separated into separate methods to lessen the clutter?

Copy link
Author

Choose a reason for hiding this comment

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

I've removed this code and now set the config directory for the Vita in ConfigHandler.h using the SDL_GetPrefPath function. Should I made that the default? It should work on every platform.

addItem(
MenuItem("Fullscreen", [&]() {}, cf.getFullscreen(), 1,
MenuItem::OptionType::TOGGLE));
#ifndef __vita__
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe the PSP specific options menu could be its own class.

Copy link
Owner

Choose a reason for hiding this comment

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

You could use the square_sans_serif_7 font for the logo. The font file is in the assets folder.

#include <SDL2/SDL_keyboard.h>
#include <SDL2/SDL_scancode.h>
#include <SDL2/SDL_mixer.h>
#include <exception>
#include <iostream>
#include <string>
#include <json/json.h>
Copy link
Owner

Choose a reason for hiding this comment

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

I guess going from INI to JSON is OK. I know handling C++ dependencies on Windows is a pain though...

@sharkwouter
Copy link
Author

Thanks for the review, I really appreciate it. I'll address your comments on weekend. I'm glad the json change was okay. I'll see if I can get automated Windows builds going too.

@sharkwouter
Copy link
Author

I'm sorry for not updating this for so long. I was hoping you'd look at the jsoncpp change first. This one was a bit undermaintained for a while. The DolceSDK is now archived, so I'm switching this over to the VITASDK instead. I've, however, found a bug in the VITASDK which I'm fixing.

This resulted in the following PRs which need to be merged before I can continue:

The upstream SDL2_mixer bug I already managed to fix: libsdl-org/SDL_mixer#575

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.

2 participants