mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-04 00:49:02 -06:00 
			
		
		
		
	SVC: Replace GetPointer usage with ReadBlock in OutputDebugString.
This commit is contained in:
		@@ -267,9 +267,9 @@ void Wrap() {
 | 
			
		||||
    func(((s64)PARAM(1) << 32) | PARAM(0));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
template <void func(const char*, int len)>
 | 
			
		||||
template <void func(VAddr, int len)>
 | 
			
		||||
void Wrap() {
 | 
			
		||||
    func((char*)Memory::GetPointer(PARAM(0)), PARAM(1));
 | 
			
		||||
    func(PARAM(0), PARAM(1));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
template <void func(u8)>
 | 
			
		||||
 
 | 
			
		||||
@@ -619,8 +619,10 @@ static void Break(u8 break_reason) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Used to output a message on a debug hardware unit - does nothing on a retail unit
 | 
			
		||||
static void OutputDebugString(const char* string, int len) {
 | 
			
		||||
    LOG_DEBUG(Debug_Emulated, "%.*s", len, string);
 | 
			
		||||
static void OutputDebugString(VAddr address, int len) {
 | 
			
		||||
    std::vector<char> string(len);
 | 
			
		||||
    Memory::ReadBlock(address, string.data(), len);
 | 
			
		||||
    LOG_DEBUG(Debug_Emulated, "%.*s", len, string.data());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Get resource limit
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user