From bad547d0906b7a6e32ebdaf210446d43ef72c96d Mon Sep 17 00:00:00 2001 From: "Lars A. Doucet" Date: Thu, 30 Jul 2015 15:47:19 -0500 Subject: [PATCH] display -- (almost) final touches --- lime/system/Display.hx | 4 ++-- project/include/system/Display.h | 4 ++-- project/src/backend/sdl/SDLDisplay.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lime/system/Display.hx b/lime/system/Display.hx index 4a97108e0..aa72f1ebe 100644 --- a/lime/system/Display.hx +++ b/lime/system/Display.hx @@ -96,7 +96,7 @@ class Display { name = lime_display_get_name(id); var obj = lime_display_get_current_display_mode(id); - mode = new DisplayMode(obj.width, obj.height, obj.refreshRate, obj.format); + mode = new DisplayMode(obj.width, obj.height, obj.refresh_rate, obj.format); resolution = new ConstVector2(mode.width, mode.height); @@ -106,7 +106,7 @@ class Display { for (i in 0...numModes) { obj = lime_display_get_display_mode(id, i); - modes.push(new DisplayMode(obj.width, obj.height, obj.refreshRate, obj.format)); + modes.push(new DisplayMode(obj.width, obj.height, obj.refresh_rate, obj.format)); } } diff --git a/project/include/system/Display.h b/project/include/system/Display.h index 875f05456..1192b20d2 100644 --- a/project/include/system/Display.h +++ b/project/include/system/Display.h @@ -11,8 +11,8 @@ namespace lime { public: - static value Display::GetCurrentDisplayMode (int displayIndex); - static value Display::GetDisplayMode (int displayIndex, int modeIndex); + static value GetCurrentDisplayMode (int displayIndex); + static value GetDisplayMode (int displayIndex, int modeIndex); static int GetNumDevices (); static const char* GetDisplayName (int displayIndex); static int GetNumDisplayModes (int displayIndex); diff --git a/project/src/backend/sdl/SDLDisplay.cpp b/project/src/backend/sdl/SDLDisplay.cpp index a0c7d6857..f280e719b 100644 --- a/project/src/backend/sdl/SDLDisplay.cpp +++ b/project/src/backend/sdl/SDLDisplay.cpp @@ -10,8 +10,8 @@ namespace lime { SDL_GetCurrentDisplayMode(displayIndex, &mode); value mValue = alloc_empty_object (); - alloc_field (mValue, val_id("w"), alloc_int(mode.w)); - alloc_field (mValue, val_id("h"), alloc_int(mode.h)); + alloc_field (mValue, val_id("width"), alloc_int(mode.w)); + alloc_field (mValue, val_id("height"), alloc_int(mode.h)); alloc_field (mValue, val_id("refresh_rate"), alloc_int(mode.refresh_rate)); alloc_field (mValue, val_id("format"), alloc_int(mode.format)); return mValue; @@ -24,8 +24,8 @@ namespace lime { SDL_GetDisplayMode(displayIndex, modeIndex, &mode); value mValue = alloc_empty_object (); - alloc_field (mValue, val_id("w"), alloc_int(mode.w)); - alloc_field (mValue, val_id("h"), alloc_int(mode.h)); + alloc_field (mValue, val_id("width"), alloc_int(mode.w)); + alloc_field (mValue, val_id("height"), alloc_int(mode.h)); alloc_field (mValue, val_id("refresh_rate"), alloc_int(mode.refresh_rate)); alloc_field (mValue, val_id("format"), alloc_int(mode.format)); return mValue;