Skip to content

Commit 678cd10

Browse files
committed
Fixed white space on the left/top of background images with an origin of "0.5 0.5". Hopefully.
Added additional error output when SDL renderer fails to create window.
1 parent 4efbafd commit 678cd10

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Renderer_init_sdlgl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace Renderer
6666

6767
if(sdlWindow == NULL)
6868
{
69-
LOG(LogError) << "Error creating SDL window!";
69+
LOG(LogError) << "Error creating SDL window!\n\t" << SDL_GetError();
7070
return false;
7171
}
7272

src/components/ImageComponent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ void ImageComponent::updateVertices()
189189
const float width = round(bottomRight.x() - topLeft.x());
190190
const float height = round(bottomRight.y() - topLeft.y());
191191

192-
topLeft[0] = round(topLeft[0]);
193-
topLeft[1] = round(topLeft[1]);
192+
topLeft[0] = floor(topLeft[0]);
193+
topLeft[1] = floor(topLeft[1]);
194194
bottomRight[0] = topLeft[0] + width;
195195
bottomRight[1] = topLeft[1] + height;
196196

0 commit comments

Comments
 (0)