Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upPSP2: Add Playstation Vita support #915
Conversation
0441e07
to
073a3f3
|
Good start, but I do not like code pollution in surfacesdl-graphics.cpp. It will be difficult to maintain the the future. Also, why this patch has object files? Isn't it possible to compile them? |
| @@ -43,6 +43,55 @@ | |||
| #include "graphics/surface.h" | |||
| #include "gui/EventRecorder.h" | |||
|
|
|||
| #ifdef PSP2 | |||
This comment has been minimized.
This comment has been minimized.
sev-
Mar 2, 2017
Member
Would it be possible to overload the SurfaceSdlGraphicsManager class instead of these #ifdefs?
This comment has been minimized.
This comment has been minimized.
rsn8887
Mar 2, 2017
Author
Contributor
I will try to do this on the weekend but it might take a while.
This comment has been minimized.
This comment has been minimized.
| } | ||
| #endif // SDL_VERSION_ATLEAST(2, 0, 0) | ||
|
|
||
| #endif | ||
| #endif |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| @@ -43,6 +43,55 @@ | |||
| #include "graphics/surface.h" | |||
| #include "gui/EventRecorder.h" | |||
|
|
|||
| #ifdef PSP2 | |||
| #include "vita2d.h" | |||
| #include "lcd3x_v.h" | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| @@ -0,0 +1,37 @@ | |||
| #ifndef BIN_PACKING_2D_H | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
rsn8887
Mar 2, 2017
•
Author
Contributor
These are dependencies to enable shader support. They don't need to be here. I will remove them and add instructions how to install these dependencies to the build instructions in readme-psp2. They can just be installed like any other library, into the users standard SDK paths, and then simply linked.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
sev-
Mar 4, 2017
Member
Since this code is removed, how it should be possible to build the port?
One of the alternatives is that you provide a pre-built package with sources and we put it to our server, and you refer to it from our Wiki at the port building instructions.
This comment has been minimized.
This comment has been minimized.
rsn8887
Mar 5, 2017
Author
Contributor
vita2d is a standard library of the vitasdk but it is Frangarcj's "fbo" branch. it can be just downloaded from github and built with "make install" basically. Detailed instructions are on readme-psp2.md. Tldr: this is a "standard" library similar to SDL. No need to include it with scummVM
|
Hmm but now it crashes on startup. Must be missing something when I refactored psp2sdl graphics manager... |
|
It is not crashing on startup anymore, but now it crashes on exit whenever it tries to delete _graphicsManager (must have to do with inheritance of new PSP2SdlGraphicsManager). Also it crashes when launching Dreamweb but not any other game. |
|
Ok it is done, no crashes anymore. The code is now properly inheriting from SurfaceSdlGraphicsManager. |
| : | ||
| SurfaceSdlGraphicsManager(sdlEventSource, window), | ||
| _vitatex_hwscreen(nullptr), | ||
| _sdlpixels_hwscreen(nullptr) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| PSP2SdlGraphicsManager::~PSP2SdlGraphicsManager() { | ||
| if (_vitatex_hwscreen) { | ||
| vita2d_free_texture(_vitatex_hwscreen); | ||
| for(int i = 0; i < 6; i++) { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| _screen = NULL; | ||
| } | ||
|
|
||
| #if SDL_VERSION_ATLEAST(2, 0, 0) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| if (_hwscreen) { | ||
| if (_vitatex_hwscreen) { | ||
| vita2d_free_texture(_vitatex_hwscreen); | ||
| for(int i = 0; i < 6; i++) { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| if (_vitatex_hwscreen) { | ||
| if (_shaders[0] == NULL) { | ||
| // load shaders | ||
| _shaders[GFX_SHADER_NONE] = vita2d_create_shader((const SceGxmProgram *) texture_v, (const SceGxmProgram *) texture_f); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| int scale1; | ||
|
|
||
| // definitions not available for non-DEBUG here. (needed this to compile in SYMBIAN32 & linux?) | ||
| #if defined(DEBUG) && !defined(WIN32) && !defined(_WIN32_WCE) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Great work! Merging |
|
We should also update the credits. |
rsn8887 commentedMar 1, 2017
•
edited
This is the merge-able version of #901 with all suggested changes applied. I think we should merge this "single commit" version because of all the merge issues with #901.
Is it possible to change the author of this PR and of the included commit to Cpasjuste? He did almost all the work on implementing the Vita port, I just did the merge and a few small changes to it here and there over time. So Cpasjuste should be listed in the history as the original author of the Vita port.
The file dists/psp2/readme-psp2.md includes build instructions. All done by Cpasjuste.