diff --git a/.hgtags b/.hgtags index e12439c6a..1df67720a 100644 --- a/.hgtags +++ b/.hgtags @@ -7,3 +7,4 @@ bcca82b60d0f5cd724edbe4ed65db18ab95d4691 0.7.2 e0f98d53debb62347c6433ca0534a0f77f15f76f 0.8.0 38c00c788bcb03bda2ad40efebcdfe7a6be85b4a 0.9.0 8b113c345e97e7bb7e963e5d67451abdfb05cfde 0.9.1 +a5e405cdf14d030b71d09a105086797942ae91a9 0.9.2 diff --git a/changes.txt b/changes.txt index 41d63fde9..4751bfd6c 100644 --- a/changes.txt +++ b/changes.txt @@ -50,7 +50,7 @@ Released: N/A LOVE 0.9.2 [Baby Inspector] --------------------------- - Released: N/A + Released: 2015-02-14 * Added Lua 5.3's UTF-8 module (via utf8 = require("utf8")). * Added Shader:getExternVariable. @@ -83,6 +83,7 @@ LOVE 0.9.2 [Baby Inspector] * Added love.window.toPixels and love.window.fromPixels. * Added love.window.setPosition and love.window.getPosition, and 'x' and 'y' fields to love.window.setMode and t.window in love.conf. * Added love.filesystem.isSymlink, love.filesystem.setSymlinksEnabled, and love.filesystem.areSymlinksEnabled. + * Added love.filesystem.getRealDirectory. * Deprecated SpriteBatch:bind and SpriteBatch:unbind. * Deprecated all uses of the name 'FSAA' in favor of 'MSAA'. @@ -122,6 +123,7 @@ LOVE 0.9.2 [Baby Inspector] * Updated the Windows executable to automatically prefer the higher performance GPU on nvidia Optimus systems. * Updated the --console command-line argument in Windows to open the console before conf.lua is loaded. + * Updated t.console and the --console command-line argument in Windows to use the existing Console window, if love was launched from one. * Updated the love executable to verify that the love library's version matches. * Updated the Lua wrapper code for modules to avoid crashes when the module's instance is created, deleted, and recreated. * Updated internal code for handling garbage collection of love objects to be more efficient. diff --git a/platform/unix/debian/changelog.in b/platform/unix/debian/changelog.in index 4901a576a..158bc6aab 100644 --- a/platform/unix/debian/changelog.in +++ b/platform/unix/debian/changelog.in @@ -1,4 +1,4 @@ -love@LOVE_SUFFIX@ (0.9.0~ppatest5) precise; urgency=medium +love@LOVE_SUFFIX@ (0.9.2~rc1ppa3) precise; urgency=medium * Upstream testing release diff --git a/platform/unix/debian/control.in b/platform/unix/debian/control.in index d05ad7819..4116afacb 100644 --- a/platform/unix/debian/control.in +++ b/platform/unix/debian/control.in @@ -4,6 +4,9 @@ Priority: extra Maintainer: Bart van Strien Build-Depends: debhelper (>= 9), autotools-dev, + autoconf, + automake, + libtool, pkg-config, libfreetype6-dev, libluajit-5.1-dev, @@ -16,7 +19,7 @@ Build-Depends: debhelper (>= 9), libmpg123-dev, zlib1g-dev, libjpeg-turbo8-dev -Standards-Version: 3.9.3 +Standards-Version: 3.9.5 Homepage: http://love2d.org Package: liblove@LOVE_SUFFIX@ diff --git a/src/modules/keyboard/wrap_Keyboard.cpp b/src/modules/keyboard/wrap_Keyboard.cpp index cc5e26716..a2eb77eb9 100644 --- a/src/modules/keyboard/wrap_Keyboard.cpp +++ b/src/modules/keyboard/wrap_Keyboard.cpp @@ -84,7 +84,7 @@ int w_getKeyFromScancode(lua_State *L) const char *scancodestr = luaL_checkstring(L, 1); Keyboard::Scancode scancode; if (!Keyboard::getConstant(scancodestr, scancode)) - return luaL_error(L, "Invalid scancode: %s", scancode); + return luaL_error(L, "Invalid scancode: %s", scancodestr); Keyboard::Key key = instance()->getKeyFromScancode(scancode); diff --git a/src/modules/love/love.cpp b/src/modules/love/love.cpp index 6ff11df90..2e205f2a1 100644 --- a/src/modules/love/love.cpp +++ b/src/modules/love/love.cpp @@ -250,44 +250,77 @@ int luaopen_love(lua_State * L) #ifdef LOVE_LEGENDARY_CONSOLE_IO_HACK +// Mostly taken from the Windows 8.1 SDK's VersionHelpers.h. +static bool IsWindowsVistaOrGreater() +{ + OSVERSIONINFOEXW osvi = {sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0}; + + osvi.dwMajorVersion = HIBYTE(_WIN32_WINNT_VISTA); + osvi.dwMinorVersion = LOBYTE(_WIN32_WINNT_VISTA); + osvi.wServicePackMajor = 0; + + DWORDLONG majorversionmask = VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL); + DWORDLONG versionmask = VerSetConditionMask(majorversionmask, VER_MINORVERSION, VER_GREATER_EQUAL); + DWORDLONG mask = VerSetConditionMask(versionmask, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL); + + return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, mask) != FALSE; +} + int w__openConsole(lua_State *L) { static bool is_open = false; + if (is_open) - return 0; + { + love::luax_pushboolean(L, is_open); + return 1; + } + is_open = true; - if (GetConsoleWindow() != NULL || AllocConsole() == 0) - return 0; + // FIXME: we don't call AttachConsole in Windows XP because it seems to + // break later AllocConsole calls if it fails. A better workaround might be + // possible, but it's hard to find a WinXP system to test on these days... + if (!IsWindowsVistaOrGreater() || !AttachConsole(ATTACH_PARENT_PROCESS)) + { + // Create our own console if we can't attach to an existing one. + if (!AllocConsole()) + { + is_open = false; + love::luax_pushboolean(L, is_open); + return 1; + } - const int MAX_CONSOLE_LINES = 5000; - CONSOLE_SCREEN_BUFFER_INFO console_info; + SetConsoleTitle(TEXT("LOVE Console")); - // Set size. - GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &console_info); - console_info.dwSize.Y = MAX_CONSOLE_LINES; - SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), console_info.dwSize); + const int MAX_CONSOLE_LINES = 5000; + CONSOLE_SCREEN_BUFFER_INFO console_info; - SetConsoleTitle(TEXT("LOVE Console")); + // Set size. + GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &console_info); + console_info.dwSize.Y = MAX_CONSOLE_LINES; + SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), console_info.dwSize); + } - FILE * fp; + FILE *fp; // Redirect stdout. fp = freopen("CONOUT$", "w", stdout); if (L && fp == NULL) - luaL_error(L, "Console redirection of stdout failed."); + return luaL_error(L, "Console redirection of stdout failed."); // Redirect stdin. fp = freopen("CONIN$", "r", stdin); if (L && fp == NULL) - luaL_error(L, "Console redirection of stdin failed."); + return luaL_error(L, "Console redirection of stdin failed."); // Redirect stderr. fp = freopen("CONOUT$", "w", stderr); if (L && fp == NULL) - luaL_error(L, "Console redirection of stderr failed."); + return luaL_error(L, "Console redirection of stderr failed."); - return 0; + love::luax_pushboolean(L, is_open); + return 1; } #endif // LOVE_LEGENDARY_CONSOLE_IO_HACK