The Dink Network

Reply to Re: Dink Smallwood HD: Native Linux (and Mac) Port – Collaboration & Testing

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
February 14th, 02:57 PM
knight.gif
Hey Seth, thanks for merging the patches and setting up the linux_setup.sh script! That's a clever workaround for the assets. I tested the build on Ubuntu and everything you listed works great — playing the base game, browsing/installing DMODs, save states, audio with MP3 and MIDI. Regarding the things that don't work yet, I'd like to take a crack at some of them: Window resizing. The key pieces are:
An UpdateViewport() function that recalculates the OpenGL projection matrix to maintain the 4:3 aspect ratio with letterboxing/pillarboxing
Hooking into SDL_WINDOWEVENT_RESIZED to update the viewport and the engine's screen info (SetPrimaryScreenSize + SetupScreenInfo + SetupFakePrimaryScreenSize) so mouse coordinates stay correct after resize
Calling UpdateViewport() from OnScreenSizeChange() as well
Fullscreen toggle (F11) — I also had this working. The approach was:
OnFullscreenToggleRequestMultiplatform() using SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP) for borderless fullscreen
Using SDL_GetKeyboardState() to poll F11 since the Proton BaseApp doesn't have a GetKeyState() method on non-Windows platforms
The hotkey handlers needed to be moved outside the #ifdef C_DINK_KEYBOARD_INPUT block in CheckForHotkeys() since that macro is only defined for _WIN32
Controller support — I haven't looked into this yet but I see the GamepadManager and SDL2 gamepad code is already in the Proton SDK. Might just need some wiring up on the Linux side. I can submit PRs for the resize and fullscreen fixes if you're interested. Should I base them on the current master now that you've cleaned things up? Also great news about iOS, Android and HTML5 compiling out of the box — that lowers the barrier a lot for the community.