Remove check for Windows platform

This commit is contained in:
Anders Jenbo 2019-09-13 03:48:07 +02:00
commit c1fb75d738
7 changed files with 0 additions and 74 deletions

View file

@ -584,19 +584,6 @@ void TextDlg(HWND hDlg, char *text)
SetDlgItemText(hDlg, 1000, text);
}
void ErrOkDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr)
{
char *size;
LPARAM dwInitParam[128];
size = strrchr(log_file_path, '\\');
if (size)
log_file_path = size + 1;
wsprintf((LPSTR)dwInitParam, "%s\nat: %s line %d", GetErrorStr(error_code), log_file_path, log_line_nr);
DialogBoxParam(ghInst, MAKEINTRESOURCE(template_id), ghMainWnd, (DLGPROC)FuncDlg, (LPARAM)dwInitParam);
}
void FileErrDlg(const char *error)
{
FreeDlg();

View file

@ -27,7 +27,6 @@ void center_window(HWND hDlg);
void ErrDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr);
BOOL __stdcall FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, char *text);
void TextDlg(HWND hDlg, char *text);
void ErrOkDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr);
void FileErrDlg(const char *error);
void DiskFreeDlg(char *error);
BOOL InsertCDDlg();

View file

@ -251,8 +251,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
#endif
ghInst = hInst;
if (RestrictedTest())
ERR_OK_DLG(IDD_DIALOG10, 0);
if (ReadOnlyTest()) {
if (!GetModuleFileName(ghInst, szFileName, sizeof(szFileName)))
szFileName[0] = '\0';

View file

@ -2,40 +2,6 @@
DEVILUTION_BEGIN_NAMESPACE
BOOL SystemSupported()
{
OSVERSIONINFO VersionInformation;
BOOL ret = FALSE;
memset(&VersionInformation, 0, sizeof(VersionInformation));
VersionInformation.dwOSVersionInfoSize = sizeof(VersionInformation);
if (GetVersionEx(&VersionInformation)
&& VersionInformation.dwPlatformId == VER_PLATFORM_WIN32_NT
&& VersionInformation.dwMajorVersion >= 5) {
ret = TRUE;
}
return ret;
}
BOOL RestrictedTest()
{
FILE *f;
char Buffer[MAX_PATH];
BOOL ret = FALSE;
if (SystemSupported() && GetWindowsDirectory(Buffer, sizeof(Buffer))) {
strcat(Buffer, "\\Diablo1RestrictedTest.foo");
f = fopen(Buffer, "wt");
if (f) {
fclose(f);
remove(Buffer);
} else {
ret = TRUE;
}
}
return ret;
}
BOOL ReadOnlyTest()
{
char *c;

View file

@ -2,8 +2,6 @@
#ifndef __RESTRICT_H__
#define __RESTRICT_H__
BOOL SystemSupported();
BOOL RestrictedTest();
BOOL ReadOnlyTest();
#endif /* __RESTRICT_H__ */

View file

@ -214,25 +214,6 @@ typedef struct tagPALETTEENTRY {
BYTE peFlags;
} PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
typedef struct _SYSTEM_INFO {
union {
DWORD dwOemId;
struct {
WORD wProcessorArchitecture;
WORD wReserved;
};
};
DWORD dwPageSize;
LPVOID lpMinimumApplicationAddress;
LPVOID lpMaximumApplicationAddress;
DWORD_PTR dwActiveProcessorMask;
DWORD dwNumberOfProcessors;
DWORD dwProcessorType;
DWORD dwAllocationGranularity;
WORD wProcessorLevel;
WORD wProcessorRevision;
} SYSTEM_INFO, *LPSYSTEM_INFO;
typedef void *LPSECURITY_ATTRIBUTES;
typedef struct _LIST_ENTRY {

3
defs.h
View file

@ -146,9 +146,6 @@
#define assert(exp) (void)( (exp) || (assert_fail(__LINE__, __FILE__, #exp), 0) )
#endif
#define ERR_OK_DLG(templateId, errorCode) \
ErrOkDlg((templateId), (errorCode), __FILE__, __LINE__)
#define ERR_DLG(templateId, errorCode) \
ErrDlg((templateId), (errorCode), __FILE__, __LINE__)