mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Step 2 of removing PanicAlert
This commit is contained in:
1 parent
617bbcfb87
commit
47a3bf1dd7
7 files changed
+21
-37
No files matched your search
+2
-2
@@ -147,8 +147,8 @@ const void *ThunkManager::ProtectFunction(const void *function, int num_params)
|
||||
iter = thunks.find(function);
|
||||
if (iter != thunks.end())
|
||||
return (const void *)iter->second;
|
||||
if (!region)
|
||||
PanicAlert("Trying to protect functions before the emu is started. Bad bad bad.");
|
||||
|
||||
_assert_msg_(region != nullptr, "Can't protect functions before the emu is started.");
|
||||
|
||||
BeginWrite();
|
||||
const u8 *call_point = GetCodePtr();
|
||||
|
||||
+5
-10
@@ -1414,8 +1414,7 @@ static int GetVEXpp(u8 opPrefix)
|
||||
|
||||
void XEmitter::WriteAVXOp(u8 opPrefix, u16 op, X64Reg regOp1, X64Reg regOp2, OpArg arg, int extrabytes)
|
||||
{
|
||||
if (!cpu_info.bAVX)
|
||||
PanicAlert("Trying to use AVX on a system that doesn't support it. Bad programmer.");
|
||||
_assert_msg_(cpu_info.bAVX, "Trying to use AVX on a system that doesn't support it. Bad programmer.");
|
||||
int mmmmm = GetVEXmmmmm(op);
|
||||
int pp = GetVEXpp(opPrefix);
|
||||
// FIXME: we currently don't support 256-bit instructions, and "size" is not the vector size here
|
||||
@@ -1439,16 +1438,14 @@ void XEmitter::WriteVEXOp(int size, u8 opPrefix, u16 op, X64Reg regOp1, X64Reg r
|
||||
void XEmitter::WriteBMI1Op(int size, u8 opPrefix, u16 op, X64Reg regOp1, X64Reg regOp2, OpArg arg, int extrabytes)
|
||||
{
|
||||
CheckFlags();
|
||||
if (!cpu_info.bBMI1)
|
||||
PanicAlert("Trying to use BMI1 on a system that doesn't support it. Bad programmer.");
|
||||
_assert_msg_(cpu_info.bBMI1, "Trying to use BMI1 on a system that doesn't support it. Bad programmer.");
|
||||
WriteVEXOp(size, opPrefix, op, regOp1, regOp2, arg, extrabytes);
|
||||
}
|
||||
|
||||
void XEmitter::WriteBMI2Op(int size, u8 opPrefix, u16 op, X64Reg regOp1, X64Reg regOp2, OpArg arg, int extrabytes)
|
||||
{
|
||||
CheckFlags();
|
||||
if (!cpu_info.bBMI2)
|
||||
PanicAlert("Trying to use BMI2 on a system that doesn't support it. Bad programmer.");
|
||||
_assert_msg_(cpu_info.bBMI2, "Trying to use BMI2 on a system that doesn't support it. Bad programmer.");
|
||||
WriteVEXOp(size, opPrefix, op, regOp1, regOp2, arg, extrabytes);
|
||||
}
|
||||
|
||||
@@ -1742,15 +1739,13 @@ void XEmitter::PMULUDQ(X64Reg dest, const OpArg &arg) {WriteSSEOp(0x66, 0xF4, de
|
||||
|
||||
void XEmitter::WriteSSSE3Op(u8 opPrefix, u16 op, X64Reg regOp, OpArg arg, int extrabytes)
|
||||
{
|
||||
if (!cpu_info.bSSSE3)
|
||||
PanicAlert("Trying to use SSSE3 on a system that doesn't support it. Bad programmer.");
|
||||
_assert_msg_(cpu_info.bSSSE3, "Trying to use SSSE3 on a system that doesn't support it. Bad programmer.");
|
||||
WriteSSEOp(opPrefix, op, regOp, arg, extrabytes);
|
||||
}
|
||||
|
||||
void XEmitter::WriteSSE41Op(u8 opPrefix, u16 op, X64Reg regOp, OpArg arg, int extrabytes)
|
||||
{
|
||||
if (!cpu_info.bSSE4_1)
|
||||
PanicAlert("Trying to use SSE4.1 on a system that doesn't support it. Bad programmer.");
|
||||
_assert_msg_(cpu_info.bSSE4_1, "Trying to use SSE4.1 on a system that doesn't support it. Bad programmer.");
|
||||
WriteSSEOp(opPrefix, op, regOp, arg, extrabytes);
|
||||
}
|
||||
|
||||
|
||||
@@ -356,8 +356,8 @@ void GPRRegCache::MapReg(MIPSGPReg i, bool doLoad, bool makeDirty) {
|
||||
|
||||
if (!regs[i].away || (regs[i].away && regs[i].location.IsImm())) {
|
||||
X64Reg xr = GetFreeXReg();
|
||||
if (xregs[xr].dirty) PanicAlert("Xreg already dirty");
|
||||
if (xregs[xr].allocLocked) PanicAlert("GetFreeXReg returned locked register");
|
||||
_assert_msg_(!xregs[xr].dirty, "Xreg already dirty");
|
||||
_assert_msg_(!xregs[xr].allocLocked, "GetFreeXReg returned locked register");
|
||||
xregs[xr].free = false;
|
||||
xregs[xr].mipsReg = i;
|
||||
xregs[xr].dirty = makeDirty || regs[i].location.IsImm();
|
||||
@@ -371,8 +371,7 @@ void GPRRegCache::MapReg(MIPSGPReg i, bool doLoad, bool makeDirty) {
|
||||
}
|
||||
for (int j = 0; j < 32; j++) {
|
||||
if (i != MIPSGPReg(j) && regs[j].location.IsSimpleReg(xr)) {
|
||||
ERROR_LOG(JIT, "BindToRegister: Strange condition");
|
||||
Crash();
|
||||
_assert_msg_(false, "BindToRegister: Strange condition");
|
||||
}
|
||||
}
|
||||
regs[i].away = true;
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
{
|
||||
if (regs[preg].away && regs[preg].location.IsSimpleReg())
|
||||
return regs[preg].location.GetSimpleReg();
|
||||
PanicAlert("Not so simple - %i", preg);
|
||||
_assert_msg_(false, "Not so simple - %d", preg);
|
||||
return (Gen::X64Reg)-1;
|
||||
}
|
||||
Gen::OpArg GetDefaultLocation(MIPSGPReg reg) const;
|
||||
|
||||
@@ -222,8 +222,7 @@ void __PPGeInit() {
|
||||
|
||||
bool loadedZIM = !skipZIM && LoadZIM("ppge_atlas.zim", width, height, &flags, imageData);
|
||||
if (!skipZIM && !loadedZIM) {
|
||||
PanicAlert("Failed to load ppge_atlas.zim.\n\nPlace it in the directory \"assets\" under your PPSSPP directory.");
|
||||
ERROR_LOG(SCEGE, "PPGe init failed - no atlas texture. PPGe stuff will not be drawn.");
|
||||
ERROR_LOG(SCEGE, "Failed to load ppge_atlas.zim.\n\nPlace it in the directory \"assets\" under your PPSSPP directory.\n\nPPGe stuff will not be drawn.");
|
||||
}
|
||||
|
||||
if (loadedZIM) {
|
||||
|
||||
+8
-17
@@ -23,19 +23,14 @@ WaveFileWriter::~WaveFileWriter()
|
||||
bool WaveFileWriter::Start(const std::string& filename, unsigned int HLESampleRate)
|
||||
{
|
||||
// Check if the file is already open
|
||||
if (file)
|
||||
{
|
||||
PanicAlert("The file %s was already open, the file header will not be written.",
|
||||
filename.c_str());
|
||||
if (file) {
|
||||
ERROR_LOG(SYSTEM, "The file %s was already open, the file header will not be written.", filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
file.Open(filename, "wb");
|
||||
if (!file)
|
||||
{
|
||||
PanicAlert("The file %s could not be opened for writing. Please check if it's already opened "
|
||||
"by another program.",
|
||||
filename.c_str());
|
||||
if (!file) {
|
||||
ERROR_LOG(SYSTEM, "The file %s could not be opened for writing. Please check if it's already opened by another program.", filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,9 +56,8 @@ bool WaveFileWriter::Start(const std::string& filename, unsigned int HLESampleRa
|
||||
Write(100 * 1000 * 1000 - 32);
|
||||
|
||||
// We are now at offset 44
|
||||
if (file.Tell() != 44)
|
||||
PanicAlert("Wrong offset: %lld", (long long)file.Tell());
|
||||
|
||||
u64 offset = file.Tell();
|
||||
_assert_msg_(offset == 44, "Wrong offset: %lld", (long long)offset);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -91,11 +85,8 @@ void WaveFileWriter::Write4(const char* ptr)
|
||||
|
||||
void WaveFileWriter::AddStereoSamples(const short* sample_data, u32 count)
|
||||
{
|
||||
if (!file)
|
||||
PanicAlert("WaveFileWriter - file not open.");
|
||||
|
||||
if (count > BUFFER_SIZE * 2)
|
||||
PanicAlert("WaveFileWriter - buffer too small (count = %u).", count);
|
||||
_assert_msg_(file, "WaveFileWriter - file not open.");
|
||||
_assert_msg_(count <= BUFFER_SIZE * 2, "WaveFileWriter - buffer too small (count = %u).", count);
|
||||
|
||||
if (skip_silence)
|
||||
{
|
||||
|
||||
@@ -218,7 +218,7 @@ void D3D9Context::Resize() {
|
||||
HRESULT hr = device_->Reset(&presentParams_);
|
||||
if (FAILED(hr)) {
|
||||
// Had to remove DXGetErrorStringA calls here because dxerr.lib is deprecated and will not link with VS 2015.
|
||||
PanicAlert("Unable to reset D3D9 device");
|
||||
_assert_msg_(false, "Unable to reset D3D9 device");
|
||||
}
|
||||
draw_->HandleEvent(Draw::Event::GOT_BACKBUFFER, 0, 0, nullptr);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user