Use boost::thread instead of std::thread
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
#include "boe.global.hpp"
|
#include "boe.global.hpp"
|
||||||
#include "universe.hpp"
|
#include "universe.hpp"
|
||||||
|
|
||||||
#include <thread>
|
#include <boost/thread.hpp>
|
||||||
#include "boe.graphics.hpp"
|
#include "boe.graphics.hpp"
|
||||||
#include "boe.newgraph.hpp"
|
#include "boe.newgraph.hpp"
|
||||||
#include "boe.fileio.hpp"
|
#include "boe.fileio.hpp"
|
||||||
@@ -332,19 +332,19 @@ void Mouse_Pressed() {
|
|||||||
location mousePos(event.mouseButton.x, event.mouseButton.y);
|
location mousePos(event.mouseButton.x, event.mouseButton.y);
|
||||||
volatile bool doneScrolling = false;
|
volatile bool doneScrolling = false;
|
||||||
if(mousePos.in(text_sbar->getBounds())) {
|
if(mousePos.in(text_sbar->getBounds())) {
|
||||||
std::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_TRANS));
|
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_TRANS));
|
||||||
text_sbar->handleClick(mousePos);
|
text_sbar->handleClick(mousePos);
|
||||||
doneScrolling = true;
|
doneScrolling = true;
|
||||||
updater.join();
|
updater.join();
|
||||||
redraw_screen(REFRESH_TRANS);
|
redraw_screen(REFRESH_TRANS);
|
||||||
} else if(mousePos.in(item_sbar->getBounds())) {
|
} else if(mousePos.in(item_sbar->getBounds())) {
|
||||||
std::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_INVEN));
|
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_INVEN));
|
||||||
item_sbar->handleClick(mousePos);
|
item_sbar->handleClick(mousePos);
|
||||||
doneScrolling = true;
|
doneScrolling = true;
|
||||||
updater.join();
|
updater.join();
|
||||||
redraw_screen(REFRESH_INVEN);
|
redraw_screen(REFRESH_INVEN);
|
||||||
} else if(overall_mode == MODE_SHOPPING && mousePos.in(shop_sbar->getBounds())) {
|
} else if(overall_mode == MODE_SHOPPING && mousePos.in(shop_sbar->getBounds())) {
|
||||||
std::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_DLOG));
|
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_DLOG));
|
||||||
shop_sbar->handleClick(mousePos);
|
shop_sbar->handleClick(mousePos);
|
||||||
doneScrolling = true;
|
doneScrolling = true;
|
||||||
updater.join();
|
updater.join();
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <thread>
|
#include <boost/thread.hpp>
|
||||||
|
|
||||||
#include "scen.global.hpp"
|
#include "scen.global.hpp"
|
||||||
#include "scenario.hpp"
|
#include "scenario.hpp"
|
||||||
@@ -531,13 +531,13 @@ void Mouse_Pressed() {
|
|||||||
location mousePos(event.mouseButton.x, event.mouseButton.y);
|
location mousePos(event.mouseButton.x, event.mouseButton.y);
|
||||||
volatile bool doneScrolling = false;
|
volatile bool doneScrolling = false;
|
||||||
if(right_sbar->isVisible() && mousePos.in(right_sbar->getBounds())) {
|
if(right_sbar->isVisible() && mousePos.in(right_sbar->getBounds())) {
|
||||||
std::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling)));
|
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling)));
|
||||||
right_sbar->handleClick(mousePos);
|
right_sbar->handleClick(mousePos);
|
||||||
doneScrolling = true;
|
doneScrolling = true;
|
||||||
updater.join();
|
updater.join();
|
||||||
redraw_screen(/*REFRESH_RIGHT_BAR*/);
|
redraw_screen(/*REFRESH_RIGHT_BAR*/);
|
||||||
} else if(pal_sbar->isVisible() && mousePos.in(pal_sbar->getBounds())) {
|
} else if(pal_sbar->isVisible() && mousePos.in(pal_sbar->getBounds())) {
|
||||||
std::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling)));
|
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling)));
|
||||||
pal_sbar->handleClick(mousePos);
|
pal_sbar->handleClick(mousePos);
|
||||||
doneScrolling = true;
|
doneScrolling = true;
|
||||||
updater.join();
|
updater.join();
|
||||||
|
Reference in New Issue
Block a user