mmatyas / openblok

A customizable, cross platform, open-source falling block game, packed with a bunch of features.
GNU General Public License v3.0
99 stars 15 forks source link

Vita support #50

Closed sharkwouter closed 2 years ago

sharkwouter commented 2 years ago

So, I managed to get OpenBlock starting the the Vita with some changes to the CMake files. Then it took a change to SDLWindow.cppto get controls working, because the Vita never actually passes a SDL_JOYDEVICEADDED event. I also made it so the game always starts in full screen on the Vita and it does not show the multiplayer option in the menu.

Building can be done with the following commands from the root of the repo if the VitaSDK is installed:

mkdir vita
cd vita
cmake -DCMAKE_TOOLCHAIN_FILE="${VITASDK}/share/vita.toolchain.cmake" ..
make

Where should I put the build instructions? In the README.md?

Please let me know what you think of the code and what could be improved if you're interested in it.

sharkwouter commented 2 years ago

I'm converting this to a draft for a bit so I can make the Vita version build in the CI.

sharkwouter commented 2 years ago

Okay, the build in the GitHub CI is working like it should now. A bit annoying that it requires a newer git version that what's in the container.

mmatyas commented 2 years ago

Interesting! Let me review it real quick.

sharkwouter commented 2 years ago

I'm going to convert this to a draft until I figure out what I can do with the joystick pairing issue.

sharkwouter commented 2 years ago

Okay, this the joystick issue was fixed in this commit: https://github.com/vitasdk/packages/pull/179

Tomorrow the fix will also be in the container. Then it will be save to merge this.

sharkwouter commented 2 years ago

Just checked, the fix in now in the container used to build in the CI. If another build is triggered, the resulting binary will work.

mmatyas commented 2 years ago

Great! Let me take another look.

sharkwouter commented 2 years ago

I'll take a look a the commit history in this branch and see if I can take some commits out.

sharkwouter commented 2 years ago

Okay, the commit history should look a lot cleaner now.

mmatyas commented 2 years ago

Looks good, thanks!