Access violation handled by rsx::thread

gfxHandler -> rsx::g_access_violation_handler
This commit is contained in:
DHrpcs3 2016-01-20 15:46:58 +03:00
parent 9f7caf90e3
commit 685d5d3ea3
5 changed files with 48 additions and 22 deletions

View file

@ -19,6 +19,8 @@ frame_capture_data frame_debug;
namespace rsx
{
std::function<bool(u32 addr, bool is_writing)> g_access_violation_handler;
std::string shaders_cache::path_to_root()
{
return fs::get_executable_dir() + "data/";
@ -167,7 +169,7 @@ namespace rsx
return 0;
}
}
void tiled_region::write(const void *src, u32 width, u32 height, u32 pitch)
{
if (!tile)
@ -270,6 +272,19 @@ namespace rsx
}
}
thread::thread()
{
g_access_violation_handler = [this](u32 address, bool is_writing)
{
return on_access_violation(address, is_writing);
};
}
thread::~thread()
{
g_access_violation_handler = nullptr;
}
void thread::capture_frame(const std::string &name)
{
frame_capture_data::draw_state draw_state = {};