aboutsummaryrefslogtreecommitdiff
path: root/src/minimap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/minimap.cpp')
-rw-r--r--src/minimap.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/minimap.cpp b/src/minimap.cpp
index d1fb3867d..7eb7247ca 100644
--- a/src/minimap.cpp
+++ b/src/minimap.cpp
@@ -20,8 +20,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "minimap.h"
#include <math.h>
#include "logoutputbuffer.h"
-#include "jthread/jmutexautolock.h"
-#include "jthread/jsemaphore.h"
+#include "threading/mutex_auto_lock.h"
+#include "threading/semaphore.h"
#include "clientmap.h"
#include "settings.h"
#include "nodedef.h"
@@ -52,7 +52,7 @@ MinimapUpdateThread::~MinimapUpdateThread()
bool MinimapUpdateThread::pushBlockUpdate(v3s16 pos, MinimapMapblock *data)
{
- JMutexAutoLock lock(m_queue_mutex);
+ MutexAutoLock lock(m_queue_mutex);
// Find if block is already in queue.
// If it is, update the data and quit.
@@ -78,7 +78,7 @@ bool MinimapUpdateThread::pushBlockUpdate(v3s16 pos, MinimapMapblock *data)
bool MinimapUpdateThread::popBlockUpdate(QueuedMinimapUpdate *update)
{
- JMutexAutoLock lock(m_queue_mutex);
+ MutexAutoLock lock(m_queue_mutex);
if (m_update_queue.empty())
return false;
@@ -256,13 +256,13 @@ Mapper::Mapper(IrrlichtDevice *device, Client *client)
// Initialize and start thread
m_minimap_update_thread = new MinimapUpdateThread();
m_minimap_update_thread->data = data;
- m_minimap_update_thread->Start();
+ m_minimap_update_thread->start();
}
Mapper::~Mapper()
{
- m_minimap_update_thread->Stop();
- m_minimap_update_thread->Wait();
+ m_minimap_update_thread->stop();
+ m_minimap_update_thread->wait();
m_meshbuffer->drop();
@@ -290,7 +290,7 @@ MinimapMode Mapper::getMinimapMode()
void Mapper::toggleMinimapShape()
{
- JMutexAutoLock lock(m_mutex);
+ MutexAutoLock lock(m_mutex);
data->minimap_shape_round = !data->minimap_shape_round;
g_settings->setBool("minimap_shape_round", data->minimap_shape_round);
@@ -312,7 +312,7 @@ void Mapper::setMinimapMode(MinimapMode mode)
if (mode >= MINIMAP_MODE_COUNT)
return;
- JMutexAutoLock lock(m_mutex);
+ MutexAutoLock lock(m_mutex);
data->is_radar = modedefs[mode].is_radar;
data->scan_height = modedefs[mode].scan_height;
@@ -327,7 +327,7 @@ void Mapper::setPos(v3s16 pos)
bool do_update = false;
{
- JMutexAutoLock lock(m_mutex);
+ MutexAutoLock lock(m_mutex);
if (pos != data->old_pos) {
data->old_pos = data->pos;