From ca64417bb837912334e7b05bfca2ea6b8fd7927d Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Mon, 12 Feb 2018 19:54:33 +0100 Subject: [PATCH] Made width & height required parameters for NewDisplay. --- allegro5/display.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/allegro5/display.go b/allegro5/display.go index cd2c5cb..ead3879 100644 --- a/allegro5/display.go +++ b/allegro5/display.go @@ -23,7 +23,7 @@ type NewDisplayOptions struct { } // NewDisplay creates a display -func NewDisplay(options NewDisplayOptions) (*Display, error) { +func NewDisplay(width, height int, options NewDisplayOptions) (*Display, error) { var flags C.int = C.ALLEGRO_WINDOWED if options.Fullscreen { if options.Windowed { @@ -39,7 +39,7 @@ func NewDisplay(options NewDisplayOptions) (*Display, error) { } } C.al_set_new_display_flags(flags) - d := C.al_create_display(C.int(options.Width), C.int(options.Height)) + d := C.al_create_display(C.int(width), C.int(height)) if nil == d { return nil, fmt.Errorf("Error creating display") }