mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 07:26:39 +00:00 
			
		
		
		
	This means the shared memory struct is just 255 bytes longer than a few commits ago instead of 32K. Also introduce a function for putting path strings in the shared memory as there was too much copied and pasted code and it was error-prone. Also free some handles once we're done with them so they don't leak.
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			746 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			746 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "windowscrashdumppathhelpers.hpp"
 | 
						|
 | 
						|
#include <components/misc/strings/conversion.hpp>
 | 
						|
 | 
						|
namespace Crash
 | 
						|
{
 | 
						|
    std::filesystem::path getCrashDumpPath(const CrashSHM& crashShm)
 | 
						|
    {
 | 
						|
        return (std::filesystem::path(Misc::StringUtils::stringToU8String(crashShm.mStartup.mDumpDirectoryPath))
 | 
						|
            / Misc::StringUtils::stringToU8String(crashShm.mStartup.mCrashDumpFileName))
 | 
						|
            .make_preferred();
 | 
						|
    }
 | 
						|
 | 
						|
    std::filesystem::path getFreezeDumpPath(const CrashSHM& crashShm)
 | 
						|
    {
 | 
						|
        return (std::filesystem::path(Misc::StringUtils::stringToU8String(crashShm.mStartup.mDumpDirectoryPath))
 | 
						|
            / Misc::StringUtils::stringToU8String(crashShm.mStartup.mFreezeDumpFileName))
 | 
						|
            .make_preferred();
 | 
						|
    }
 | 
						|
}
 |