Attempt to fix graphical glitch while scrolling terrain palette in WINE
This commit is contained in:
@@ -548,6 +548,9 @@ void handle_menu_choice(eMenu item_hit) {
|
||||
cChoiceDlog(helpDlog).show();
|
||||
}
|
||||
|
||||
// This is here to try and fix a major graphical bug while scrolling on WINE
|
||||
extern sf::RenderTexture terrain_buttons_gworld;
|
||||
|
||||
static void handleUpdateWhileScrolling(volatile bool& doneScrolling) {
|
||||
while(!doneScrolling) {
|
||||
sf::sleep(sf::milliseconds(10));
|
||||
@@ -557,6 +560,7 @@ static void handleUpdateWhileScrolling(volatile bool& doneScrolling) {
|
||||
set_up_terrain_buttons(false);
|
||||
}
|
||||
mainPtr.setActive(false);
|
||||
terrain_buttons_gworld.setActive(false);
|
||||
}
|
||||
|
||||
void Mouse_Pressed() {
|
||||
@@ -572,6 +576,7 @@ void Mouse_Pressed() {
|
||||
redraw_screen(/*REFRESH_RIGHT_BAR*/);
|
||||
} else if(pal_sbar->isVisible() && mousePos.in(pal_sbar->getBounds())) {
|
||||
mainPtr.setActive(false);
|
||||
terrain_buttons_gworld.setActive(false);
|
||||
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling)));
|
||||
pal_sbar->handleClick(mousePos);
|
||||
doneScrolling = true;
|
||||
|
Reference in New Issue
Block a user