Permalink
Browse files

DSPCore: Make DSPCore_SetException() take an enum type instead of a u8

Makes it more immediately indicative which values are intended to be
passed to this function.
  • Loading branch information...
lioncash committed Jun 17, 2018
1 parent 6bfbc19 commit 8459d2bc5d64cf6aecaa46398b63f2526aa292f3
Showing with 4 additions and 4 deletions.
  1. +2 −2 Source/Core/Core/DSP/DSPCore.cpp
  2. +2 −2 Source/Core/Core/DSP/DSPCore.h
@@ -202,9 +202,9 @@ void DSPCore_Reset()
Analyzer::Analyze();
}
void DSPCore_SetException(u8 level)
void DSPCore_SetException(ExceptionType exception)
{
g_dsp.exceptions |= 1 << level;
g_dsp.exceptions |= 1 << exception;
}
// Notify that an external interrupt is pending (used by thread mode)
@@ -208,7 +208,7 @@ enum : u16
};
// Exception vectors
enum : int
enum ExceptionType : int
{
EXP_STOVF = 1, // 0x0002 stack under/over flow
EXP_2 = 2, // 0x0004
@@ -356,7 +356,7 @@ void DSPCore_CheckExceptions();
void DSPCore_SetExternalInterrupt(bool val);
// sets a flag in the pending exception register.
void DSPCore_SetException(u8 level);
void DSPCore_SetException(ExceptionType exception);
enum class State
{

0 comments on commit 8459d2b

Please sign in to comment.