Migrating from SDL 1.2 to SDL2 |
MrTAToad
|
SDL_WINDOWEVENT_ENTER and LEAVE may be what you are after
|
|||||||||||
|
AmigaBlitter
|
Thank you for the reply.
Now it's the SDL_UpdateRects turn. What if this function was previously used to update specific screen portions? There's an equivalent in SDL2? |
|||||||||||
|
AmigaBlitter
|
Anyone?
|
|||||||||||
|
Migrating from SDL 1.2 to SDL2 |
MrOzBarry
|
Looks like SDL_UpdateWindowSurfaceRects might do what you want. When in doubt, just browse the wiki. You can see all the functions alphabetically and just search the page with Ctrl/Cmd+F with things that might make sense, in this case, I did that with 'Rects'.
On Thu, May 12, 2016 at 10:02 AM, AmigaBlitter wrote:
|
|||||||||||||
|
AmigaBlitter
|
Thank you, i can't find any specific example for SDL2. Documentation hard to find around.
Hope that specific tutorial for migration pops out around. |
|||||||||||
|
AmigaBlitter
|
Migration guide is a bit vague on this:
"That's right, if you've been using SDL_UpdateRect() or SDL_Flip() to get your bits to the screen, the render API uses SDL_RenderPresent(). " |
|||||||||||
|
Migrating from SDL 1.2 to SDL2 |
Jonny D
|
It depends on your porting strategy. If you're using SDL_GetWindowSurface(), then use SDL_UpdateWindowSurfaceRects(). Otherwise, using hardware SDL_Renderer, there is no analogous function; you are expected to refresh the whole screen all at once with SDL_RenderPresent().
Jonny D On Thu, May 12, 2016 at 10:59 AM, AmigaBlitter wrote:
|
|||||||||||||
|
AmigaBlitter
|
Thank you for the info.
|
|||||||||||
|
AmigaBlitter
|
Hello again,
can anyone help me in creating a routine to find a screen mode with specific mode or pixel format? in SDL1 the routine is as follow:
i have some difficulty to create an SDL2 version of this function |
|||||||||||||
|