-
Notifications
You must be signed in to change notification settings - Fork 9
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
sharkwouter
wants to merge
33
commits into
a544jh:master
Choose a base branch
from
sharkwouter:vita-dolce
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
508f4dc
Initial work, still crashes
sharkwouter c3ba08f
Use json file for configuration
sharkwouter e6be53a
Update README
sharkwouter 2d52291
Improve output when config can't be loaded
sharkwouter 763d996
Update CMakeLists.txt for Vita
sharkwouter 346720c
Updated CMakeLists.txt and added assets
sharkwouter 7843b4c
Remove CMake directory
sharkwouter cebe499
Fix keys not loading from configuration
sharkwouter bb82760
Moved vita specific assets
sharkwouter f156b80
Set resolution to vita one
sharkwouter 8c49d5f
Update configuration file
sharkwouter 7dcfce4
Use DOLCESDK
sharkwouter 047011d
Change config to use start and not disable music
sharkwouter f6cfc19
Add app0:/ to all file loading
sharkwouter fc637f6
Make panel-pop able to compile for PC again
sharkwouter 97544eb
Clean up config file
sharkwouter a13812d
Removed out of place spaces
sharkwouter eb2b537
Minimize changes from master
sharkwouter 9f3972f
Remove useless print statement
sharkwouter 1cff2a9
Make same codebase work with both PC and Vita
sharkwouter a409f3f
Fix formatting
sharkwouter c3a4a4f
Make configuration writable for PS Vita
sharkwouter 46dbe9e
Don't show options which make no sense to Vita users
sharkwouter 7be217c
Fix small error in json file for Vita
sharkwouter f21fdf6
Update version and title on Vita
sharkwouter 9a3029f
Fix version number
sharkwouter 3550fe5
Replace placeholder images for Vita
sharkwouter 0b1332d
Add source for startup image
sharkwouter 1794013
Updated README with instructions on how to build Vita version
sharkwouter 9cf54be
Fix Playstation Vita title in README being too big
sharkwouter f938c81
Update README.md
sharkwouter 5d1d036
Use VITASDK instead of the unsupported DolceSDK
sharkwouter 1ae534b
Clean up some Vita specific code
sharkwouter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
#include <SDL2/SDL_timer.h> | ||
#include <string> | ||
#include <vector> | ||
#include <sstream> | ||
|
||
|
||
#include "../Config/ConfigHandler.h" | ||
#include "../SDLContext.h" | ||
|
@@ -23,22 +25,34 @@ OptionsMenu::OptionsMenu(OptionsMenuState &state) : | |
|
||
ConfigHandler &cf = ConfigHandler::getInstance(); | ||
|
||
addItem( | ||
MenuItem("Fullscreen", [&]() {}, cf.getFullscreen(), 1, | ||
MenuItem::OptionType::TOGGLE)); | ||
#ifndef __vita__ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe the PSP specific options menu could be its own class. |
||
addItem( | ||
MenuItem("Fullscreen", [&]() {}, cf.getFullscreen(), 1, | ||
MenuItem::OptionType::TOGGLE)); | ||
#endif | ||
|
||
addItem( | ||
MenuItem("Music volume", [&]() {}, cf.getMusicVolume(), | ||
MIX_MAX_VOLUME, MenuItem::OptionType::SLIDER)); | ||
addItem( | ||
MenuItem("SFX volume", [&]() {}, cf.getSfxVolume(), MIX_MAX_VOLUME, | ||
MenuItem::OptionType::SLIDER)); | ||
addItem(MenuItem("Configure controls", [&]() { | ||
_state.configurePlayerKeys(_items.at(_selection).getValue() + 1); | ||
}, 0, 1, MenuItem::OptionType::PLAYER)); | ||
|
||
#ifndef __vita__ | ||
addItem(MenuItem("Configure controls", [&]() { | ||
_state.configurePlayerKeys(_items.at(_selection).getValue() + 1); | ||
}, 0, 1, MenuItem::OptionType::PLAYER)); | ||
#endif | ||
|
||
addItem(MenuItem("Apply", [&]() { | ||
cf.setFullscreen(_items.at(0).getValue()); | ||
cf.setMusicVolume(_items.at(1).getValue()); | ||
cf.setSfxVolume(_items.at(2).getValue()); | ||
#ifdef __vita__ | ||
cf.setMusicVolume(_items.at(0).getValue()); | ||
cf.setSfxVolume(_items.at(1).getValue()); | ||
#else | ||
cf.setFullscreen(_items.at(0).getValue()); | ||
cf.setMusicVolume(_items.at(1).getValue()); | ||
cf.setSfxVolume(_items.at(2).getValue()); | ||
#endif | ||
cf.saveConfig(); | ||
_state.goBack(); | ||
})); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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...