mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Wii U support (#1097)
* Wii U support * [WiiU] Combined Dockerfile * [WiiU] Combined Dockerfile * [WiiU] Combined Dockerfile * Add Jenkins support * wiiu: fix scissor clamp * wiiu: improve button remapping * wiiu: fix scaling issues * Update Dockerfile after merge * Pull assets before build * Only stop container once * Adjust logging sinks * wiiu: Change button mapping to match PC version * wiiu: Implement controller changes * wiiu: Update BUILDING.md Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Co-authored-by: David Chavez <david@dcvz.io>
This commit is contained in:
parent
b989ef4f7f
commit
68e7f2e6c1
57 changed files with 5460 additions and 73 deletions
|
@ -130,7 +130,13 @@ float BinaryReader::ReadSingle()
|
|||
stream->Read((char*)&result, sizeof(float));
|
||||
|
||||
if (endianness != Endianness::Native)
|
||||
result = BitConverter::ToFloatBE((uint8_t*)&result, 0);
|
||||
{
|
||||
float tmp;
|
||||
char* dst = (char*)&tmp;
|
||||
char* src = (char*)&result;
|
||||
dst[3] = src[0]; dst[2] = src[1]; dst[1] = src[2]; dst[0] = src[3];
|
||||
result = tmp;
|
||||
}
|
||||
|
||||
if (std::isnan(result))
|
||||
throw std::runtime_error("BinaryReader::ReadSingle(): Error reading stream");
|
||||
|
@ -145,7 +151,14 @@ double BinaryReader::ReadDouble()
|
|||
stream->Read((char*)&result, sizeof(double));
|
||||
|
||||
if (endianness != Endianness::Native)
|
||||
result = BitConverter::ToDoubleBE((uint8_t*)&result, 0);
|
||||
{
|
||||
double tmp;
|
||||
char* dst = (char*)&tmp;
|
||||
char* src = (char*)&result;
|
||||
dst[7] = src[0]; dst[6] = src[1]; dst[5] = src[2]; dst[4] = src[3];
|
||||
dst[3] = src[4]; dst[2] = src[5]; dst[1] = src[6]; dst[0] = src[7];
|
||||
result = tmp;
|
||||
}
|
||||
|
||||
if (std::isnan(result))
|
||||
throw std::runtime_error("BinaryReader::ReadDouble(): Error reading stream");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue