Merge branch 'linuxfix' of https://github.com/sephiroth99/xenia into sephiroth99-linuxfix
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#ifndef XENIA_BASE_BIT_MAP_H_
|
||||
#define XENIA_BASE_BIT_MAP_H_
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
@@ -52,4 +53,4 @@ class BitMap {
|
||||
|
||||
} // namespace xe
|
||||
|
||||
#endif // XENIA_BASE_BIT_MAP_H_
|
||||
#endif // XENIA_BASE_BIT_MAP_H_
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "xenia/base/byte_stream.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "xenia/base/assert.h"
|
||||
|
||||
namespace xe {
|
||||
@@ -34,4 +36,24 @@ void ByteStream::Write(const uint8_t* buf, size_t len) {
|
||||
Advance(len);
|
||||
}
|
||||
|
||||
} // namespace xe
|
||||
template <>
|
||||
std::string ByteStream::Read() {
|
||||
std::string str;
|
||||
uint32_t len = Read<uint32_t>();
|
||||
str.resize(len);
|
||||
|
||||
Read(reinterpret_cast<uint8_t*>(&str[0]), len);
|
||||
return str;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::wstring ByteStream::Read() {
|
||||
std::wstring str;
|
||||
uint32_t len = Read<uint32_t>();
|
||||
str.resize(len);
|
||||
|
||||
Read(reinterpret_cast<uint8_t*>(&str[0]), len * 2);
|
||||
return str;
|
||||
}
|
||||
|
||||
} // namespace xe
|
||||
|
||||
@@ -46,26 +46,6 @@ class ByteStream {
|
||||
return data;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::string Read() {
|
||||
std::string str;
|
||||
uint32_t len = Read<uint32_t>();
|
||||
str.resize(len);
|
||||
|
||||
Read(reinterpret_cast<uint8_t*>(&str[0]), len);
|
||||
return str;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::wstring Read() {
|
||||
std::wstring str;
|
||||
uint32_t len = Read<uint32_t>();
|
||||
str.resize(len);
|
||||
|
||||
Read(reinterpret_cast<uint8_t*>(&str[0]), len * 2);
|
||||
return str;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Write(T data) {
|
||||
Write(reinterpret_cast<uint8_t*>(&data), sizeof(T));
|
||||
@@ -87,6 +67,12 @@ class ByteStream {
|
||||
size_t offset_ = 0;
|
||||
};
|
||||
|
||||
template <>
|
||||
std::string ByteStream::Read();
|
||||
|
||||
template <>
|
||||
std::wstring ByteStream::Read();
|
||||
|
||||
} // namespace xe
|
||||
|
||||
#endif // XENIA_BASE_BYTE_STREAM_H_
|
||||
#endif // XENIA_BASE_BYTE_STREAM_H_
|
||||
|
||||
@@ -261,7 +261,9 @@ void Profiler::OnMouseDown(bool left_button, bool right_button) {}
|
||||
void Profiler::OnMouseUp() {}
|
||||
void Profiler::OnMouseMove(int x, int y) {}
|
||||
void Profiler::OnMouseWheel(int x, int y, int dy) {}
|
||||
void Profiler::set_display(std::unique_ptr<ui::MicroprofilerDrawer> display) {}
|
||||
void Profiler::ToggleDisplay() {}
|
||||
void Profiler::TogglePause() {}
|
||||
void Profiler::set_window(ui::Window* window) {}
|
||||
void Profiler::Present() {}
|
||||
|
||||
#endif // XE_OPTION_PROFILING
|
||||
|
||||
@@ -45,8 +45,7 @@ std::string X64Context::GetStringFromValue(X64Register reg, bool hex) const {
|
||||
static_cast<int>(X64Register::kXmm15)) {
|
||||
auto value = xmm_registers[static_cast<int>(reg) -
|
||||
static_cast<int>(X64Register::kXmm0)];
|
||||
return hex ? string_util::to_hex_string(value)
|
||||
: string_util::to_string(value);
|
||||
return hex ? string_util::to_hex_string(value) : xe::to_string(value);
|
||||
} else {
|
||||
assert_unhandled_case(reg);
|
||||
return "";
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "xenia/base/vec128.h"
|
||||
|
||||
namespace xe {
|
||||
|
||||
enum class X64Register {
|
||||
@@ -84,24 +86,24 @@ class X64Context {
|
||||
|
||||
union {
|
||||
struct {
|
||||
__m128 xmm0;
|
||||
__m128 xmm1;
|
||||
__m128 xmm2;
|
||||
__m128 xmm3;
|
||||
__m128 xmm4;
|
||||
__m128 xmm5;
|
||||
__m128 xmm6;
|
||||
__m128 xmm7;
|
||||
__m128 xmm8;
|
||||
__m128 xmm9;
|
||||
__m128 xmm10;
|
||||
__m128 xmm11;
|
||||
__m128 xmm12;
|
||||
__m128 xmm13;
|
||||
__m128 xmm14;
|
||||
__m128 xmm15;
|
||||
vec128_t xmm0;
|
||||
vec128_t xmm1;
|
||||
vec128_t xmm2;
|
||||
vec128_t xmm3;
|
||||
vec128_t xmm4;
|
||||
vec128_t xmm5;
|
||||
vec128_t xmm6;
|
||||
vec128_t xmm7;
|
||||
vec128_t xmm8;
|
||||
vec128_t xmm9;
|
||||
vec128_t xmm10;
|
||||
vec128_t xmm11;
|
||||
vec128_t xmm12;
|
||||
vec128_t xmm13;
|
||||
vec128_t xmm14;
|
||||
vec128_t xmm15;
|
||||
};
|
||||
__m128 xmm_registers[16];
|
||||
vec128_t xmm_registers[16];
|
||||
};
|
||||
|
||||
static const char* GetRegisterName(X64Register reg);
|
||||
|
||||
Reference in New Issue
Block a user