mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
s/WIN32/_WIN32/
This commit is contained in:
@@ -4,11 +4,11 @@
|
|||||||
#include "CVideoHandler.h"
|
#include "CVideoHandler.h"
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
void DLLHandler::Instantiate(const char *filename)
|
void DLLHandler::Instantiate(const char *filename)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
dll = LoadLibraryA(filename);
|
dll = LoadLibraryA(filename);
|
||||||
#else
|
#else
|
||||||
dll = dlopen(filename,RTLD_LOCAL | RTLD_LAZY);
|
dll = dlopen(filename,RTLD_LOCAL | RTLD_LAZY);
|
||||||
@@ -16,7 +16,7 @@ void DLLHandler::Instantiate(const char *filename)
|
|||||||
}
|
}
|
||||||
const char *DLLHandler::GetLibExtension()
|
const char *DLLHandler::GetLibExtension()
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
return "dll";
|
return "dll";
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
return "dylib";
|
return "dylib";
|
||||||
@@ -29,7 +29,7 @@ const char *DLLHandler::GetLibExtension()
|
|||||||
|
|
||||||
void *DLLHandler::FindAddress234(const char *symbol)
|
void *DLLHandler::FindAddress234(const char *symbol)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
if ((int)symbol == 0x00001758)
|
if ((int)symbol == 0x00001758)
|
||||||
return NULL;
|
return NULL;
|
||||||
std::cout<<"co ja tu robie"<<std::endl;
|
std::cout<<"co ja tu robie"<<std::endl;
|
||||||
@@ -40,7 +40,7 @@ void *DLLHandler::FindAddress234(const char *symbol)
|
|||||||
}
|
}
|
||||||
DLLHandler::~DLLHandler()
|
DLLHandler::~DLLHandler()
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
FreeLibrary(dll);
|
FreeLibrary(dll);
|
||||||
#else
|
#else
|
||||||
dlclose(dll);
|
dlclose(dll);
|
||||||
@@ -69,7 +69,7 @@ int readNormalNr2 (unsigned char* bufor, int &iter, int bytCon)
|
|||||||
}
|
}
|
||||||
void RaiseLastOSErrorAt(char * offset)
|
void RaiseLastOSErrorAt(char * offset)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
int * lastError = new int;
|
int * lastError = new int;
|
||||||
std::exception * error;
|
std::exception * error;
|
||||||
*lastError = GetLastError();
|
*lastError = GetLastError();
|
||||||
@@ -111,7 +111,7 @@ void RaiseLastOSErrorAt(char * offset)
|
|||||||
//}
|
//}
|
||||||
void CBIKHandler::open(std::string name)
|
void CBIKHandler::open(std::string name)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
hBinkFile = CreateFile
|
hBinkFile = CreateFile
|
||||||
(
|
(
|
||||||
L"CSECRET.BIK", // file name
|
L"CSECRET.BIK", // file name
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
#ifndef __CVIDEOHANDLER_H__
|
#ifndef __CVIDEOHANDLER_H__
|
||||||
#define __CVIDEOHANDLER_H__
|
#define __CVIDEOHANDLER_H__
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
Reference in New Issue
Block a user