DSFML2
Bernard Helyer
b.helyer at gmail.com
Fri Jan 15 13:11:22 PST 2010
Okay, I got it to build and run. My hello world application segfaults if
I quit with alt+f4 or escape, and sometimes if I just close it using the
window manager.
(32 bit linux DMD 2.039, bernardh from #D)
hello.d:
------------------
module hello;
import std.stdio;
import dsfml.system.all;
import dsfml.window.all;
import dsfml.graphics.all;
void main()
{
auto app = new RenderWindow(VideoMode(800, 600, 32), "DSFML Window");
while (app.isOpened) {
app.display();
Event e;
while (app.getEvent(e)) {
if (e.Type == EventType.Closed ||
e.Type == EventType.KeyPressed && e.Key.Code ==
KeyCode.Escape) {
app.close();
}
}
}
}
-----------------
Am I doing something bone-headed here?
Thanks,
-Bernard.
More information about the Digitalmars-d-announce
mailing list