[Codacy] Fixed some issues found by codacy.
Added skipping shaders directory in scan
This commit is contained in:
parent
18b5a6706a
commit
c8ca077ec4
|
@ -5,3 +5,4 @@ exclude_paths:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'android/**'
|
- 'android/**'
|
||||||
- '**.md'
|
- '**.md'
|
||||||
|
- 'src/xenia/gpu/shaders/**'
|
||||||
|
|
|
@ -1613,8 +1613,8 @@ void EmulatorWindow::LoadRecentlyLaunchedTitles() {
|
||||||
try {
|
try {
|
||||||
cpptoml::parser p(file);
|
cpptoml::parser p(file);
|
||||||
parsed_file = p.parse();
|
parsed_file = p.parse();
|
||||||
} catch (cpptoml::parse_exception exception) {
|
} catch (cpptoml::parse_exception& exception) {
|
||||||
// TODO(Gliniak): Better handling of errors, but good enough for now.
|
XELOGE("Cannot parse file: recent.toml. Error: {}", exception.what());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -385,7 +385,6 @@ void XmaContext::Decode(XMA_CONTEXT_DATA* data) {
|
||||||
data->input_buffer_0_packet_count * kBytesPerPacket;
|
data->input_buffer_0_packet_count * kBytesPerPacket;
|
||||||
size_t input_buffer_1_size =
|
size_t input_buffer_1_size =
|
||||||
data->input_buffer_1_packet_count * kBytesPerPacket;
|
data->input_buffer_1_packet_count * kBytesPerPacket;
|
||||||
size_t input_total_size = input_buffer_0_size + input_buffer_1_size;
|
|
||||||
|
|
||||||
size_t current_input_size =
|
size_t current_input_size =
|
||||||
data->current_buffer ? input_buffer_1_size : input_buffer_0_size;
|
data->current_buffer ? input_buffer_1_size : input_buffer_0_size;
|
||||||
|
@ -420,7 +419,6 @@ void XmaContext::Decode(XMA_CONTEXT_DATA* data) {
|
||||||
assert_false(data->stop_when_done);
|
assert_false(data->stop_when_done);
|
||||||
assert_false(data->interrupt_when_done);
|
assert_false(data->interrupt_when_done);
|
||||||
static int total_samples = 0;
|
static int total_samples = 0;
|
||||||
bool reuse_input_buffer = false;
|
|
||||||
// Decode until we can't write any more data.
|
// Decode until we can't write any more data.
|
||||||
while (output_remaining_bytes > 0) {
|
while (output_remaining_bytes > 0) {
|
||||||
if (!data->input_buffer_0_valid && !data->input_buffer_1_valid) {
|
if (!data->input_buffer_0_valid && !data->input_buffer_1_valid) {
|
||||||
|
@ -429,7 +427,7 @@ void XmaContext::Decode(XMA_CONTEXT_DATA* data) {
|
||||||
}
|
}
|
||||||
// Setup the input buffer if we are at loop_end.
|
// Setup the input buffer if we are at loop_end.
|
||||||
// The input buffer must not be swapped out until all loops are processed.
|
// The input buffer must not be swapped out until all loops are processed.
|
||||||
reuse_input_buffer = TrySetupNextLoop(data, false);
|
bool reuse_input_buffer = TrySetupNextLoop(data, false);
|
||||||
|
|
||||||
// assert_true(packets_skip_ == 0);
|
// assert_true(packets_skip_ == 0);
|
||||||
// assert_true(split_frame_len_ == 0);
|
// assert_true(split_frame_len_ == 0);
|
||||||
|
|
|
@ -118,7 +118,7 @@ static uint64_t convertUnixtimeToWinFiletime(time_t unixtime) {
|
||||||
// so we convert linux time to nanoseconds and then add the number of
|
// so we convert linux time to nanoseconds and then add the number of
|
||||||
// nanoseconds from 1601 to 1970
|
// nanoseconds from 1601 to 1970
|
||||||
// see https://msdn.microsoft.com/en-us/library/ms724228
|
// see https://msdn.microsoft.com/en-us/library/ms724228
|
||||||
uint64_t filetime = filetime = (unixtime * 10000000) + 116444736000000000;
|
uint64_t filetime = (unixtime * 10000000) + 116444736000000000;
|
||||||
return filetime;
|
return filetime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ std::shared_ptr<cpptoml::table> ParseConfig(
|
||||||
const std::filesystem::path& config_path) {
|
const std::filesystem::path& config_path) {
|
||||||
try {
|
try {
|
||||||
return ParseFile(config_path);
|
return ParseFile(config_path);
|
||||||
} catch (cpptoml::parse_exception e) {
|
} catch (cpptoml::parse_exception& e) {
|
||||||
xe::FatalError(fmt::format("Failed to parse config file '{}':\n\n{}",
|
xe::FatalError(fmt::format("Failed to parse config file '{}':\n\n{}",
|
||||||
xe::path_to_utf8(config_path), e.what()));
|
xe::path_to_utf8(config_path), e.what()));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -1172,7 +1172,7 @@ void* X64HelperEmitter::EmitVectorVRsqrteHelper(void* scalar_helper) {
|
||||||
vshufps(xmm0, xmm0,xmm0, _MM_SHUFFLE(3, 3, 3, 3));
|
vshufps(xmm0, xmm0,xmm0, _MM_SHUFFLE(3, 3, 3, 3));
|
||||||
call(scalar_helper);
|
call(scalar_helper);
|
||||||
// this->DebugBreak();
|
// this->DebugBreak();
|
||||||
vinsertps(xmm0, xmm0, (3 << 4) | (0 << 6));
|
vinsertps(xmm0, xmm0, (3 << 4));
|
||||||
|
|
||||||
vblendps(xmm0, xmm0, ptr[backend()->LookupXMMConstantAddress(XMMFloatInf)],
|
vblendps(xmm0, xmm0, ptr[backend()->LookupXMMConstantAddress(XMMFloatInf)],
|
||||||
0b0111);
|
0b0111);
|
||||||
|
|
|
@ -1593,7 +1593,6 @@ void Value::VectorAverage(Value* other, TypeName type, bool is_unsigned,
|
||||||
void Value::ByteSwap() {
|
void Value::ByteSwap() {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case INT8_TYPE:
|
case INT8_TYPE:
|
||||||
constant.i8 = constant.i8;
|
|
||||||
break;
|
break;
|
||||||
case INT16_TYPE:
|
case INT16_TYPE:
|
||||||
constant.i16 = xe::byte_swap(constant.i16);
|
constant.i16 = xe::byte_swap(constant.i16);
|
||||||
|
|
|
@ -1213,7 +1213,7 @@ void KernelState::InitializeKernelGuestGlobals() {
|
||||||
|
|
||||||
KernelGuestGlobals* block =
|
KernelGuestGlobals* block =
|
||||||
memory_->TranslateVirtual<KernelGuestGlobals*>(kernel_guest_globals_);
|
memory_->TranslateVirtual<KernelGuestGlobals*>(kernel_guest_globals_);
|
||||||
memset(block, 0, sizeof(block));
|
memset(block, 0, sizeof(KernelGuestGlobals));
|
||||||
|
|
||||||
auto idle_process = memory()->TranslateVirtual<X_KPROCESS*>(GetIdleProcess());
|
auto idle_process = memory()->TranslateVirtual<X_KPROCESS*>(GetIdleProcess());
|
||||||
InitializeProcess(idle_process, X_PROCTYPE_IDLE, 0, 0, 0);
|
InitializeProcess(idle_process, X_PROCTYPE_IDLE, 0, 0, 0);
|
||||||
|
|
Loading…
Reference in New Issue