mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-26 04:32:35 +01:00
Remove unused files (ps3emu_api)
This commit is contained in:
parent
372cb39ce8
commit
6dd2c78b1b
@ -1,65 +0,0 @@
|
||||
#include "ps3emu_api.h"
|
||||
|
||||
ps3emu_api::ps3emu_api(const std::string &path)
|
||||
{
|
||||
load(path);
|
||||
}
|
||||
|
||||
bool ps3emu_api::load(const std::string &path)
|
||||
{
|
||||
if (!m_library.load(path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_no_errors = true;
|
||||
|
||||
if (!m_library.get(get_api_version, "ps3emu_api_get_api_version") || get_api_version() != ps3emu_api_version)
|
||||
{
|
||||
is_no_errors = false;
|
||||
}
|
||||
|
||||
is_no_errors = is_no_errors && m_library.get(initialize, "ps3emu_api_initialize");
|
||||
is_no_errors = is_no_errors && m_library.get(destroy, "ps3emu_api_destroy");
|
||||
|
||||
is_no_errors = is_no_errors && m_library.get(get_version_string, "ps3emu_api_get_version_string");
|
||||
is_no_errors = is_no_errors && m_library.get(get_version_number, "ps3emu_api_get_version_number");
|
||||
is_no_errors = is_no_errors && m_library.get(get_name_string, "ps3emu_api_get_name_string");
|
||||
|
||||
is_no_errors = is_no_errors && m_library.get(load_elf, "ps3emu_api_load_elf");
|
||||
|
||||
is_no_errors = is_no_errors && m_library.get(set_state, "ps3emu_api_set_state");
|
||||
is_no_errors = is_no_errors && m_library.get(get_state, "ps3emu_api_get_state");
|
||||
|
||||
if (!is_no_errors)
|
||||
{
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ps3emu_api::loaded() const
|
||||
{
|
||||
return m_library.loaded();
|
||||
}
|
||||
|
||||
void ps3emu_api::close()
|
||||
{
|
||||
initialize = nullptr;
|
||||
destroy = nullptr;
|
||||
get_version_string = nullptr;
|
||||
get_version_number = nullptr;
|
||||
get_name_string = nullptr;
|
||||
load_elf = nullptr;
|
||||
set_state = nullptr;
|
||||
get_state = nullptr;
|
||||
|
||||
m_library.close();
|
||||
}
|
||||
|
||||
ps3emu_api::operator bool() const
|
||||
{
|
||||
return loaded();
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <Utilities/dynamic_library.h>
|
||||
#include <string>
|
||||
#include "ps3emu_api_enums.h"
|
||||
#include "ps3emu_api_structs.h"
|
||||
|
||||
class ps3emu_api
|
||||
{
|
||||
utils::dynamic_library m_library;
|
||||
|
||||
public:
|
||||
ps3emu_api() = default;
|
||||
ps3emu_api(const std::string &path);
|
||||
|
||||
unsigned int(*get_api_version)() = nullptr;
|
||||
ps3emu_api_error_code(*initialize)(const ps3emu_api_initialize_callbacks *callbacks) = nullptr;
|
||||
ps3emu_api_error_code(*destroy)() = nullptr;
|
||||
|
||||
ps3emu_api_error_code(*get_version_string)(char *dest_buffer, int dest_buffer_size) = nullptr;
|
||||
ps3emu_api_error_code(*get_version_number)(int *version_number) = nullptr;
|
||||
ps3emu_api_error_code(*get_name_string)(char *dest_buffer, int dest_buffer_size) = nullptr;
|
||||
|
||||
ps3emu_api_error_code(*load_elf)(const char *path) = nullptr;
|
||||
|
||||
ps3emu_api_error_code(*set_state)(ps3emu_api_state state) = nullptr;
|
||||
ps3emu_api_error_code(*get_state)(ps3emu_api_state *state) = nullptr;
|
||||
|
||||
bool load(const std::string &path);
|
||||
bool loaded() const;
|
||||
void close();
|
||||
|
||||
explicit operator bool() const;
|
||||
};
|
||||
|
@ -69,9 +69,6 @@
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\ps3emu_api\ps3emu_api.cpp">
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Utilities\bin_patch.cpp">
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
@ -350,7 +347,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\3rdparty\stblib\stb_image.h" />
|
||||
<ClInclude Include="..\ps3emu_api\ps3emu_api.h" />
|
||||
<ClInclude Include="..\Utilities\Atomic.h" />
|
||||
<ClInclude Include="..\Utilities\AtomicPtr.h" />
|
||||
<ClInclude Include="..\Utilities\BEType.h" />
|
||||
@ -569,8 +565,6 @@
|
||||
<ClInclude Include="Loader\TAR.h" />
|
||||
<ClInclude Include="Loader\TROPUSR.h" />
|
||||
<ClInclude Include="Loader\TRP.h" />
|
||||
<ClInclude Include="ps3emu_api_enums.h" />
|
||||
<ClInclude Include="ps3emu_api_structs.h" />
|
||||
<ClInclude Include="restore_new.h" />
|
||||
<ClInclude Include="rpcs3_version.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
|
@ -674,9 +674,6 @@
|
||||
<ClCompile Include="rpcs3_api.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\ps3emu_api\ps3emu_api.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Utilities\version.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -1321,15 +1318,6 @@
|
||||
<ClInclude Include="..\Utilities\dynamic_library.h">
|
||||
<Filter>Utilities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ps3emu_api_enums.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ps3emu_api_structs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\ps3emu_api\ps3emu_api.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Utilities\version.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
Loading…
Reference in New Issue
Block a user