소스 검색

Clean surface before using it

Ivan Savenko 2 년 전
부모
커밋
385dda1c5b
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      client/gui/CursorHandler.cpp

+ 3 - 0
client/gui/CursorHandler.cpp

@@ -373,6 +373,9 @@ void CursorHardware::setImage(std::shared_ptr<IImage> image, const Point & pivot
 {
 	auto cursorSurface = CSDL_Ext::newSurface(image->dimensions().x, image->dimensions().y);
 
+	Uint32 fillColor = SDL_MapRGBA(cursorSurface->format, 0, 0, 0, 0);
+	CSDL_Ext::fillRect(cursorSurface, nullptr, fillColor);
+
 	image->draw(cursorSurface);
 
 	auto oldCursor = cursor;