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.
This commit is contained in:
Lioncash 2018-06-17 16:00:48 -04:00
parent 6bfbc1988e
commit 8459d2bc5d
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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
{