-
Notifications
You must be signed in to change notification settings - Fork 21
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
error with sdl2 64bits on windows 10 64bits #148
Comments
Can you try compiling with |
Hmm. This seems very similar to #56. We thought that it's a Linux-only issue, but maybe it happens on Windows as well? Please check if this will work:
OldMask := Math.GetExceptionMask();
NewMask := OldMask;
Include(NewMask, exInvalidOp);
Include(NewMask, exZeroDivide);
Math.SetExceptionMask(NewMask);
Math.SetExceptionMask(OldMask); |
thanks , yes it works with this workaround |
dose this mean i will use this workaround always in win10 64bits ? |
Well, this bug is specific to software renderers - so if you want to support running the program using SDL2's software renderer, then yes, the workaround will be needed. I'll try poking around with a debugger a bit to see if I can spot any issues in SDL2 code. If not, I'll open an issue upstream; maybe someone there will have a better idea. |
ok , but the software renderer works fine without problem |
Hi
this simple code compiles ok but crashes when runing , but if i uncomment the lines it works ok
can you please try it on windows 10 64bits & sdl2 64bits & fpc 3.2 64bits
`
{$mode objfpc}
{$apptype gui}
program demo;
uses
sdl2;
var
win : psdl_window;
render: psdl_renderer;
ev : tsdl_event;
done: boolean = false;
begin
//sdl_sethint(sdl_hint_render_driver,'opengl');
sdl_init(sdl_init_video);
win := sdl_createwindow('FPC demo',50,50,320,200,sdl_window_shown {or sdl_window_opengl} );
render := sdl_createrenderer(win,-1,sdl_renderer_accelerated);
while not done do begin
if boolean(sdl_pollevent(@ev)) then
begin
case ev.type_ of
sdl_quitev:begin
done:= true;
end;
end;
end;
sdl_setrenderdrawcolor(render, 32, 38, 42, 255);
sdl_renderclear(render);
sdl_renderpresent(render);
end;
sdl_destroyrenderer(render);
sdl_destroywindow(win);
end.
`
The text was updated successfully, but these errors were encountered: