mirror of
https://github.com/love2d/love.git
synced 2026-08-21 13:09:56 +02:00
Applied aq1018's fix for newFont and setFont (as partly described in ticket #232)
This commit is contained in:
@@ -207,8 +207,9 @@ namespace opengl
|
||||
if(luax_istype(L, 1, FILESYSTEM_FILE_T)) {
|
||||
love::filesystem::File * f = luax_checktype<love::filesystem::File>(L, 1, "File", FILESYSTEM_FILE_T);
|
||||
Data * d = f->read();
|
||||
lua_pop(L, 1); // get rid of the file
|
||||
lua_remove(L, 1); // get rid of the file
|
||||
luax_newtype(L, "Data", DATA_T, (void*)d);
|
||||
lua_insert(L, 1); // put it at the bottom of the stack
|
||||
}
|
||||
|
||||
// Convert to Rasterizer, if necessary.
|
||||
@@ -345,8 +346,9 @@ namespace opengl
|
||||
if(luax_istype(L, 1, FILESYSTEM_FILE_T)) {
|
||||
love::filesystem::File * f = luax_checktype<love::filesystem::File>(L, 1, "File", FILESYSTEM_FILE_T);
|
||||
Data * d = f->read();
|
||||
lua_pop(L, 1); // get rid of the file
|
||||
lua_remove(L, 1); // get rid of the file
|
||||
luax_newtype(L, "Data", DATA_T, (void*)d);
|
||||
lua_insert(L, 1); // put it at the bottom of the stack
|
||||
}
|
||||
|
||||
// Convert to Rasterizer, if necessary.
|
||||
|
||||
Reference in New Issue
Block a user