Skip to content

Commit

Permalink
Fix mouse move crash and font color bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed Jan 29, 2024
1 parent 3cd2446 commit f499e45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ void BitmapCanvas::drawGlyph(CanvasTexture* texture, float left, float top, floa
uint32_t cgreen = (int32_t)clamp(color.g * 255.0f, 0.0f, 255.0f);
uint32_t cblue = (int32_t)clamp(color.b * 255.0f, 0.0f, 255.0f);
#ifdef USE_SSE2
__m128i crgba = _mm_set_epi16(0, cblue, cgreen, cred, 0, cblue, cgreen, cred);
__m128i crgba = _mm_set_epi16(0, cred, cgreen, cblue, 0, cred, cgreen, cblue);
#endif

float uscale = uvwidth / width;
Expand Down
4 changes: 3 additions & 1 deletion src/core/widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,10 @@ void Widget::OnWindowMouseMove(const Point& pos)
do
{
widget->OnMouseMove(widget->MapFrom(this, pos));
if (widget == this)
break;
widget = widget->Parent();
} while (widget != this);
} while (widget);
}
}

Expand Down

0 comments on commit f499e45

Please sign in to comment.