-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Restore support for the Nokia N-Gage #12148
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
base: main
Are you sure you want to change the base?
Conversation
|
break; | ||
} | ||
|
||
return SDL_GetScancodeFromKey(keycode, NULL); |
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'd suggest directly using the SDL_SCANCODE_
values here rather than converting from a fixed set of SDLK_
values.
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.
How do you mean that? I am currently translating the scan codes from the Symbian API into the identifiers used by SDL.
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.
Like this:
case EStdKeyBackspace: // Clear key
return SDL_SCANCODE_BACKSPACE;
break;
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 would rather set a variable while having a single point of return, however, I need to determine all the scan codes to make this work either way. 👍
What's the status on this? Are we ready to merge? (Tweaks and additional fixes/improvements can come later, but I'd rather this not have to live in a branch if it's Good Enough at this point.) |
I can't comment on the N-Gage C/C++ code, which seems to be in ok state. Short term, I can live with this but long term this needs to be fixed. |
Let's try to get the CMake stuff up to standards and merge this, so @mupfdev doesn't have to keep working out of a branch. |
@madebr started working on a compile wrapper to streamline CMake support. AFAIK it's in this branch: https://github.com/madebr/SDL/tree/cmake-ngage-extra-support If there's anything I could do to help, just let me know. I can also modify the toolchain if necessary. |
I'm currently cleaning up the compiler wrapper by @madebr (which is now part of the toolchain). |
Touch-ups
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Thanks to @madebr everything now seems to be working as intended. |
There are some unresolved feedback (github gui hides most of them due to high volume of the ticket), make sure that all are resolved to satisfaction. |
TUint8 r = (pixel & 0xF800) >> 8; | ||
TUint8 g = (pixel & 0x07E0) >> 3; | ||
TUint8 b = (pixel & 0x001F) << 3; |
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.
The N-Gage renderer currently uses SDL_PIXELFORMAT_ARGB4444
for all textures, but these masks and shifts correspond to SDL_PIXELFORMAT_RGB565
instead.
|
||
float sx; | ||
float sy; | ||
SDL_GetRenderScale(renderer, &sx, &sy); |
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.
The render scale should already be combined with dstrect
by this point, so it shouldn't be necessary to handle it here.
if (copydata->scale_x != 1.f || copydata->scale_y != 1.f) | ||
{ | ||
dest == pixel_buffer_a ? dest = pixel_buffer_b : dest = pixel_buffer_a; | ||
ApplyScale(dest, source, pitch, w, h, copydata->center.x, copydata->center.y, copydata->scale_x, copydata->scale_y); |
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.
What happens if the final scaled/rotated/flipped image is larger than the allocated bitmap?
…emove redundant nullptr. Seems to work.
…ing style/guidelines.
As described in #11243 and #6691, support for the Nokia N-Gage has been dropped due to technical limitations that have now been resolved. The custom-built C-Compiler now supports C99. The C++ compiler is still outdated and has only been retained for compatibility reasons.
Description
#
.SDL_Log()
.A demo application is currently being developed. It can be found in the ngage-toolchain repository.The backlight is kept on while the SDL application is running.Edit: The behaviour can now be modified usingSDL_DisableScreenSaver
/SDL_EnableScreenSaver
Existing Issue(s)
It is currently not possible to put the application that has been launched into the background. It continues to run and can then no longer be closed. This is a bug in the new rendering backend.If the application is put in the background while sound is playing, some of the audio is looped until the app is back in focus.
It is recommended initialising SDLs audio sub-system even when it is not required. The backend is started at a higher level. Initialising SDLs audio sub-system ensures that the backend is properly deinitialised.Edit: Not really an issue.