Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Freeze when I close the emu (0.9.9)
07-28-2014, 12:55 PM (This post was last modified: 07-28-2014 01:26 PM by Bad Company.)
Post: #15
RE: Freeze when I close the emu (0.9.9)
Yep, it happens on both 32 & 64 bit versions of PPSSPP.

Again no dialogue box here -_-, so I pressed Break All, and got the same thing,     then i pressed continue and break all and got this    

Code:
// Copyright (c) 2014- PPSSPP Project.

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License 2.0 for more details.

// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/

// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.

#include <list>
#include <memory>
#include "base/mutex.h"
#include "input/input_state.h"
#include "thread/thread.h"
#include "thread/threadutil.h"
#include "Core/Host.h"
#include "Windows/InputDevice.h"
#include "Windows/XinputDevice.h"
#include "Windows/DinputDevice.h"
#include "Windows/KeyboardDevice.h"
#include "Windows/WindowsHost.h"

static volatile bool inputThreadStatus = false;
static volatile bool inputThreadEnabled = false;
static std::thread *inputThread = NULL;
static recursive_mutex inputMutex;
static condition_variable inputEndCond;

extern InputState input_state;

inline static void ExecuteInputPoll() {
    // Hm, we may hold the input_state lock for quite a while (time it takes to poll all devices)...
    // If that becomes an issue, maybe should poll to a copy of inputstate and only hold the lock while
    // copying that one to the real one?
    lock_guard guard(input_state.lock);
    input_state.pad_buttons = 0;
    input_state.pad_lstick_x = 0;
    input_state.pad_lstick_y = 0;
    input_state.pad_rstick_x = 0;
    input_state.pad_rstick_y = 0;
    if (host) {
        host->PollControllers(input_state);
    }
    UpdateInputState(&input_state);
}

static void RunInputThread() {
    setCurrentThreadName("Input");

    // NOTE: The keyboard and mouse buttons are handled via raw input, not here.
    // This is mainly for controllers which need to be polled, instead of generating events.

    while (inputThreadEnabled) {
        ExecuteInputPoll();

        // Try to update 250 times per second.
        Sleep(4);
    }

    lock_guard guard(inputMutex);
    inputThreadStatus = false;
    inputEndCond.notify_one();
}

void InputDevice::BeginPolling() {
    lock_guard guard(inputMutex);
    inputThreadEnabled = true;
    inputThread = new std::thread(&RunInputThread);
    inputThread->detach();
}

void InputDevice::StopPolling() {
    inputThreadEnabled = false;

    lock_guard guard(inputMutex);
    if (inputThreadStatus) {
        inputEndCond.wait(inputMutex);
    }
    delete inputThread;
    inputThread = NULL;
}

I think this freeze is the same "freeze issue" that i get on dolphin when i'm using the OpenGL backend, DX9, DX11 are fine.

Correct me if i'm wrong, PPSSPP 0.9.6.2 and 0.95 uses an old OpenGL ver. and 0.97 is using a more recent ver. of OpenGL (4.4.0 ? )

And about the dolphin freeze when I'm using OpenGL, It always happens and there are no build of dolphin that doesn't freeze with OpenGL, even those VERY old builds freeze here.

CPU: Intel Core i7 3770 3.4 GHz (3.9 GHz with turbo boost) 4.23GHz with OC
RAM 8GB DDR3
NVIDIA GTX 770 Gigabyte
Windows 7 Ultimate 64bit
Currently using Driver 337.88 WHQL
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Freeze when I close the emu (0.9.9) - Bad Company - 07-28-2014 12:55 PM

Forum Jump: