Removed unnecessary sf:: prefix

This commit is contained in:
Jonathan De Wachter 2013-11-14 17:20:29 +01:00
parent 728f11701b
commit 891cd261b8
5 changed files with 17 additions and 17 deletions

View File

@ -55,13 +55,13 @@ namespace priv
ActivityStates* retrieveStates(ANativeActivity* activity)
{
// Hide the ugly cast we find in each callback function
return (sf::priv::ActivityStates*)activity->instance;
return (ActivityStates*)activity->instance;
}
static void initializeMain(ActivityStates* states)
{
// Protect from concurent access
sf::Lock lock(states->mutex);
Lock lock(states->mutex);
// Prepare and share the looper to be read later
ALooper* looper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS);
@ -75,9 +75,9 @@ static void initializeMain(ActivityStates* states)
static void terminateMain(ActivityStates* states)
{
// Protect from concurent access
sf::Lock lock(states->mutex);
Lock lock(states->mutex);
// The main thread is over, we must explicitly ask the activity to finish
// The main thread has finished, we must explicitly ask the activity to finish
states->mainOver = true;
ANativeActivity_finish(states->activity);
}
@ -88,19 +88,19 @@ void* main(ActivityStates* states)
initializeMain(states);
{
sf::Lock lock(states->mutex);
Lock lock(states->mutex);
states->initialized = true;
}
sf::sleep(sf::seconds(0.5));
sleep(seconds(0.5));
::main(0, NULL);
// Terminate properly the thread and Wait until it's done
// Terminate properly the main thread and wait until it's done
terminateMain(states);
{
sf::Lock lock(states->mutex);
Lock lock(states->mutex);
states->terminated = true;
}

View File

@ -48,7 +48,7 @@ m_surface (EGL_NO_SURFACE)
{
// Get the activity states and protect it from concurent access
ActivityStates* states = getActivity(NULL);
sf::Lock lock(states->mutex);
Lock lock(states->mutex);
// Get the intialized EGL display
m_display = states->display;
@ -85,7 +85,7 @@ m_surface (EGL_NO_SURFACE)
{
// Get the activity states and protect it from concurent access
ActivityStates* states = getActivity(NULL);
sf::Lock lock(states->mutex);
Lock lock(states->mutex);
states->context = this;

View File

@ -49,7 +49,7 @@ void InputImpl::setVirtualKeyboardVisible(bool visible)
// todo: Check if the window is active
ActivityStates* states = getActivity(NULL);
sf::Lock lock(states->mutex);
Lock lock(states->mutex);
// Initializes JNI
jint lResult;

View File

@ -64,7 +64,7 @@ VideoMode VideoModeImpl::getDesktopMode()
}
// Get size from the window
sf::Vector2i size;
Vector2i size;
size.x = ANativeWindow_getWidth(states->window);
size.y = ANativeWindow_getHeight(states->window);

View File

@ -51,7 +51,7 @@ WindowImplAndroid::WindowImplAndroid(WindowHandle handle)
WindowImplAndroid::WindowImplAndroid(VideoMode mode, const std::string& title, unsigned long style, const ContextSettings& settings)
{
ActivityStates* states = getActivity(NULL);
sf::Lock lock(states->mutex);
Lock lock(states->mutex);
// Replace our dummy process event function with the actual one
AInputQueue_detachLooper(states->inputQueue);
@ -72,7 +72,7 @@ WindowImplAndroid::~WindowImplAndroid()
WindowHandle WindowImplAndroid::getSystemHandle() const
{
ActivityStates* states = getActivity(NULL);
sf::Lock lock(states->mutex);
Lock lock(states->mutex);
return states->window;
}
@ -82,7 +82,7 @@ WindowHandle WindowImplAndroid::getSystemHandle() const
void WindowImplAndroid::processEvents()
{
ActivityStates* states = getActivity(NULL);
sf::Lock lock(states->mutex);
Lock lock(states->mutex);
// Process incoming OS events
ALooper_pollAll(0, NULL, NULL, NULL);
@ -92,7 +92,7 @@ void WindowImplAndroid::processEvents()
Event tempEvent = states->pendingEvents.back();
states->pendingEvents.pop_back();
if (tempEvent.type == sf::Event::Resized)
if (tempEvent.type == Event::Resized)
{
m_width = tempEvent.size.width;
m_height = tempEvent.size.height;
@ -315,7 +315,7 @@ int WindowImplAndroid::processEvent(int fd, int events, void* data)
int32_t key = AKeyEvent_getKeyCode(_event);
int32_t metakey = AKeyEvent_getMetaState(_event);
sf::Event event;
Event event;
event.type = (action == AKEY_EVENT_ACTION_DOWN) ? Event::KeyPressed : Event::KeyReleased;
event.key.code = androidKeyToSF(key);
event.key.alt = metakey & AMETA_ALT_ON;