Skip to content

Implement window_get_x, window_get_y, window_set_position for desktop - #620

Merged
cobaltgit merged 10 commits into
ButterscotchRunner:mainfrom
cobaltgit:window-pos
Oct 8, 2026
Merged

cobaltgit merged 10 commits into
ButterscotchRunner:mainfrom
cobaltgit:window-pos

Conversation

@cobaltgit

Copy link
Copy Markdown
Collaborator

This should make the screen shake at the very end of Undertale's genocide route work, will need testing to confirm

@cobaltgit

Copy link
Copy Markdown
Collaborator Author

This won't work on GLFW2, SDL 1.2 or the web backend

@cobaltgit cobaltgit changed the title Implement window_get_x, window_get_y, window_set_position Implement window_get_x, window_get_y, window_set_position for desktop Oct 4, 2026
@cobaltgit
cobaltgit marked this pull request as ready for review October 4, 2026 14:05
@cobaltgit
cobaltgit requested a review from Un1q32 October 7, 2026 17:08
@Un1q32

Un1q32 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

make them static functions + function pointers in the runner struct, since these functions should be optional.

@cobaltgit

cobaltgit commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator Author

That's what it should be doing, the builtins check if the runner and function pointer isn't a nullptr before proceeding, otherwise the logic is skipped and it just returns whatever

Comment thread src/backends/appkit.m Outdated
@cobaltgit

Copy link
Copy Markdown
Collaborator Author

Ok this should do it

Comment thread src/backends/sdl1.c Outdated
@cobaltgit

Copy link
Copy Markdown
Collaborator Author

Ok done that

@Un1q32

Un1q32 commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Can you make a test game that runs in 640x480 and moves exactly 640 pixels horizontally and 480 vertically so I can test that hidpi is working correctly.

@cobaltgit

Copy link
Copy Markdown
Collaborator Author

Hold up

@cobaltgit
cobaltgit merged commit fcc2959 into ButterscotchRunner:main Oct 8, 2026
32 checks passed
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