diff --git a/UWP/App.cpp b/UWP/App.cpp index 94159e7602..2077d27a8c 100644 --- a/UWP/App.cpp +++ b/UWP/App.cpp @@ -140,7 +140,7 @@ void App::OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Cor float X = args->CurrentPoint->Position.X; float Y = args->CurrentPoint->Position.Y; int64_t timestamp = args->CurrentPoint->Timestamp; - m_main->OnTouchEvent(TOUCH_MOVE, pointerId, X, Y, timestamp); + m_main->OnTouchEvent(TOUCH_MOVE, pointerId, X, Y, (double)timestamp); } void App::OnPointerEntered(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { @@ -157,7 +157,7 @@ void App::OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::C float X = args->CurrentPoint->Position.X; float Y = args->CurrentPoint->Position.Y; int64_t timestamp = args->CurrentPoint->Timestamp; - m_main->OnTouchEvent(TOUCH_DOWN|TOUCH_MOVE, pointerId, X, Y, timestamp); + m_main->OnTouchEvent(TOUCH_DOWN|TOUCH_MOVE, pointerId, X, Y, (double)timestamp); if (!m_isPhone) { sender->SetPointerCapture(); } @@ -170,7 +170,7 @@ void App::OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI:: float X = args->CurrentPoint->Position.X; float Y = args->CurrentPoint->Position.Y; int64_t timestamp = args->CurrentPoint->Timestamp; - m_main->OnTouchEvent(TOUCH_UP|TOUCH_MOVE, pointerId, X, Y, timestamp); + m_main->OnTouchEvent(TOUCH_UP|TOUCH_MOVE, pointerId, X, Y, (double)timestamp); if (!m_isPhone) { sender->ReleasePointerCapture(); } @@ -181,7 +181,7 @@ void App::OnPointerCaptureLost(Windows::UI::Core::CoreWindow^ sender, Windows::U void App::OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { int pointerId = 0; // irrelevant - float delta = args->CurrentPoint->GetCurrentPoint(args->CurrentPoint->PointerId)->Properties->MouseWheelDelta; + float delta = (float)args->CurrentPoint->GetCurrentPoint(args->CurrentPoint->PointerId)->Properties->MouseWheelDelta; m_main->OnMouseWheel(delta); } @@ -252,20 +252,19 @@ void App::OnWindowSizeChanged(CoreWindow^ sender, WindowSizeChangedEventArgs^ ar auto view = Windows::UI::ViewManagement::ApplicationView::GetForCurrentView(); g_Config.bFullScreen = view->IsFullScreenMode; - int width = sender->Bounds.Width; - int height = sender->Bounds.Height; + float width = sender->Bounds.Width; + float height = sender->Bounds.Height; float scale = m_deviceResources->GetDpi() / 96.0f; m_deviceResources->SetLogicalSize(Size(width, height)); m_main->CreateWindowSizeDependentResources(); - PSP_CoreParameter().pixelWidth = width * scale; - PSP_CoreParameter().pixelHeight = height * scale; + PSP_CoreParameter().pixelWidth = (int)(width * scale); + PSP_CoreParameter().pixelHeight = (int)(height * scale); - if (UpdateScreenScale(width, height)) { + if (UpdateScreenScale((int)width, (int)height)) { NativeMessageReceived("gpu_resized", ""); } - } void App::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEventArgs^ args) { diff --git a/UWP/StorageFileLoader.cpp b/UWP/StorageFileLoader.cpp index 36437827c0..0d566d4722 100644 --- a/UWP/StorageFileLoader.cpp +++ b/UWP/StorageFileLoader.cpp @@ -20,7 +20,6 @@ StorageFileLoader::StorageFileLoader(Windows::Storage::StorageFile ^file) { active_ = false; file_ = file; path_ = FromPlatformString(file_->Path); - INFO_LOG(IO, "StorageFileLoader - launching thread"); thread_.reset(new std::thread([this]() { this->threadfunc(); })); // Before we proceed, we need to block until the thread has found the size. @@ -31,15 +30,12 @@ StorageFileLoader::StorageFileLoader(Windows::Storage::StorageFile ^file) { } StorageFileLoader::~StorageFileLoader() { - INFO_LOG(IO, "StorageFileLoader destructor"); { std::unique_lock lock(mutex_); - INFO_LOG(IO, "StorageFileLoader - setting active to false"); active_ = false; operationRequested_ = false; cond_.notify_one(); } - INFO_LOG(IO, "StorageFileLoader - joining with thread"); thread_->join(); } @@ -53,12 +49,10 @@ void StorageFileLoader::threadfunc() { auto opentask = create_task(file_->OpenReadAsync()).then([this](IRandomAccessStreamWithContentType ^stream) { stream_ = stream; active_ = true; - INFO_LOG(IO, "StorageFileLoader: active"); }); try { opentask.wait(); - INFO_LOG(IO, "StorageFileLoader: first wait finished"); } catch (const std::exception& e) { operationFailed_ = true; // TODO: What do we do? @@ -70,11 +64,9 @@ void StorageFileLoader::threadfunc() { auto sizetask = create_task(file_->GetBasicPropertiesAsync()).then([this](Windows::Storage::FileProperties::BasicProperties ^props) { size_ = props->Size; - INFO_LOG(IO, "StorageFileLoader: Got size: %d", (int)size_); }); try { sizetask.wait(); - INFO_LOG(IO, "StorageFileLoader: second wait finished"); } catch (const std::exception& e) { const char *what = e.what(); INFO_LOG(SYSTEM, "%s", what); @@ -113,7 +105,6 @@ void StorageFileLoader::threadfunc() { break; } default: - ERROR_LOG(SYSTEM, "Unknown operation"); operationRequested_ = false; break; } @@ -173,7 +164,6 @@ size_t StorageFileLoader::ReadAt(s64 absolutePos, size_t bytes, size_t count, vo while (!responseAvailable_) { condResponse_.wait(responseLock); } - INFO_LOG(IO, "StorageFileLoader: Got response"); // still under mutexResponse_ lock here. responseAvailable_ = false; if (operationFailed_) {