Hello everyone.
This is my first post in the mailing list for sdl2. Nice to meet you all.
By the way, the work accomplished by SDL2 is great! Keep going with
this hard work.
I would like to point here the issue I am having, which seems to be
mac-specific.
I have some code like this (I am using c++ std::unique_ptr, that’s why
you see reset):
sdlWindow_.reset(SDL_CreateWindow(“Guinyote”,
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
0, 0,
SDL_WINDOW_FULLSCREEN_DESKTOP));
sdlRenderer_.reset(SDL_CreateRenderer(sdlWindow_.get(), -1,
SDL_RENDERER_ACCELERATED));
This holds true:
assert (sdlWindow_ != nullptr);
assert (sdlRenderer_ != nullptr);
But THIS is not working:
game_screen_ = SDL_GetWindowSurface(sdlWindow_.get());
assert (game_screen_ != nullptr);
This used to work in different windows and linux machines, but in my
MacBook Pro I get
the following error:
" No hardware accelerated renderers available".
If I use SDL_RENDERER_SOFTWARE, everything works fine, but this code
worked with hardware
acceleration under windows and linux.
Question:
1.- am I doing anything wrong or there is a bug?
Thanks in advance.