-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
fix(sdl2): add missing stubs #928
base: master
Are you sure you want to change the base?
Conversation
|
||
// Provides: resdl_SDL_GetNumVideoDisplays | ||
function resdl_SDL_GetNumVideoDisplays() { | ||
return 1; |
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.
Not sure if we can get the the number of displays via the web api. Are we OK with simply returning 1 here?
|
||
// Provides: resdl_SDL_GetWindowPixelFormat | ||
function resdl_SDL_GetWindowPixelFormat(_win) { | ||
return "SDL_PIXELFORMAT_ARGB8888"; |
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.
Not sure what we'd like to return here? Some sort of Unknown
tag perhaps?
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 wouldn't worry too much about getting this exactly right as I think the dummy stubs approach is fundamentally broken. There ought to be separate platform APIs for desktop, JS and mobile. More on that soon, but for now I'd suggest just going with whatever works short-term.
|
||
// Provides: resdl_SDL_GetPixelFormatName | ||
function resdl_SDL_GetPixelFormatName(value) { | ||
return "resdl_SDL_GetPixelFormatName: Not implemented"; |
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.
Same here.
|
||
// Provides: resdl_SDL_GetLinkedVersion | ||
function resdl_SDL_GetLinkedVersion() { | ||
return 1; |
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.
Same here.
|
||
// Provides: resdl_SDL_GetScancodeFromName | ||
function resdl_SDL_GetScancodeFromName() { | ||
return "scancodeFromName"; |
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.
Both this and GetKeyFromName
could probably be retrieved from the web api, I'd think!
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.
|
||
// Provides: resdl_SDL_GetCompiledVersion | ||
function resdl_SDL_GetCompiledVersion() { | ||
return "resdl_SDL_GetCompiledVersion: Not implemented"; |
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.
🤷
|
||
// Provides: resdl_SDL_GetKeyFromName | ||
function resdl_SDL_GetKeyFromName() { | ||
return "keyFromname"; |
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.
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.
Added some API-links
No description provided.