mirror of
				https://github.com/brain-hackers/brainlilo
				synced 2025-11-04 14:38:35 +09:00 
			
		
		
		
	clean unused
This commit is contained in:
		@@ -87,44 +87,6 @@ static bool isDriverLoaded()
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool addDriverToRegistry()
 | 
			
		||||
{
 | 
			
		||||
    HKEY hKey;
 | 
			
		||||
    DWORD dw;
 | 
			
		||||
    RegCreateKeyEx(HKEY_LOCAL_MACHINE, (L"Drivers\\BuiltIn\\LILODrv"), 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hKey,
 | 
			
		||||
                   &dw);
 | 
			
		||||
 | 
			
		||||
    dw = 0x0000;
 | 
			
		||||
    if (RegSetValueEx(hKey, (L"Index"), 0, REG_DWORD, (BYTE *)&dw, sizeof(DWORD)) != ERROR_SUCCESS)
 | 
			
		||||
    {
 | 
			
		||||
        RegCloseKey(hKey);
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    dw = 0x0100;
 | 
			
		||||
    if (RegSetValueEx(hKey, (L"Order"), 0, REG_DWORD, (BYTE *)&dw, sizeof(DWORD)) != ERROR_SUCCESS)
 | 
			
		||||
    {
 | 
			
		||||
        RegCloseKey(hKey);
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (RegSetValueEx(hKey, (L"Dll"), 0, REG_SZ, (BYTE *)(L"\\Windows\\BrainLILODrv.dll"),
 | 
			
		||||
                      sizeof(TCHAR) * ((DWORD)wcslen((L"\\Windows\\BrainLILODrv.dll")) + 1)) != ERROR_SUCCESS)
 | 
			
		||||
    {
 | 
			
		||||
        RegCloseKey(hKey);
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (RegSetValueEx(hKey, (L"Prefix"), 0, REG_SZ, (BYTE *)(L"LIN"), sizeof(TCHAR) * ((DWORD)wcslen((L"LIN")) + 1)) !=
 | 
			
		||||
        ERROR_SUCCESS)
 | 
			
		||||
    {
 | 
			
		||||
        RegCloseKey(hKey);
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void loadDriverIfNeeded()
 | 
			
		||||
{
 | 
			
		||||
    if (isDriverLoaded())
 | 
			
		||||
 
 | 
			
		||||
@@ -161,9 +161,7 @@ static bool doLinux()
 | 
			
		||||
{
 | 
			
		||||
    TCHAR bootloaderFileName[128] = TEXT("\\Storage Card\\loader\\u-boot.bin");
 | 
			
		||||
    HANDLE hFile;
 | 
			
		||||
    LPVOID bootloaderptr;
 | 
			
		||||
    wchar_t buf[256];
 | 
			
		||||
    HINSTANCE dll;
 | 
			
		||||
    DWORD wReadSize;
 | 
			
		||||
 | 
			
		||||
    OutputDebugString(L"BrainLILO: Opening Bootloader file...");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user