mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
* Take more link dependencies caused by OSD out of genie.lua
* Always dynamically link SDL on Windows * Fix SDL1 build on Windows
This commit is contained in:
parent
3a15dfc2d8
commit
73f53bb15e
@ -53,7 +53,7 @@ newoption {
|
||||
|
||||
newoption {
|
||||
trigger = "osd",
|
||||
description = "Choose target OSD",
|
||||
description = "Choose OSD layer implementation",
|
||||
}
|
||||
|
||||
newoption {
|
||||
@ -781,26 +781,12 @@ configuration { "mingw*" }
|
||||
"-static-libgcc",
|
||||
"-static-libstdc++",
|
||||
}
|
||||
if _OPTIONS["osd"]=="sdl" then
|
||||
links {
|
||||
"SDL2",
|
||||
"imm32",
|
||||
"version",
|
||||
"ole32",
|
||||
"oleaut32",
|
||||
}
|
||||
end
|
||||
links {
|
||||
"user32",
|
||||
"gdi32",
|
||||
"dsound",
|
||||
"dxguid",
|
||||
"winmm",
|
||||
"advapi32",
|
||||
"comctl32",
|
||||
"shlwapi",
|
||||
"wsock32",
|
||||
"comdlg32",
|
||||
}
|
||||
|
||||
configuration { "vs*" }
|
||||
@ -813,15 +799,10 @@ configuration { "vs*" }
|
||||
}
|
||||
links {
|
||||
"user32",
|
||||
"gdi32",
|
||||
"dsound",
|
||||
"dxguid",
|
||||
"winmm",
|
||||
"advapi32",
|
||||
"comctl32",
|
||||
"shlwapi",
|
||||
"wsock32",
|
||||
"comdlg32",
|
||||
}
|
||||
|
||||
buildoptions {
|
||||
|
@ -181,6 +181,14 @@ function osdmodulestargetconf()
|
||||
end
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
links {
|
||||
"gdi32",
|
||||
"dsound",
|
||||
"dxguid",
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
@ -43,6 +43,16 @@ function maintargetosdoptions(_target)
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
if _OPTIONS["SDL_LIBVER"]=="sdl2" then
|
||||
links {
|
||||
"SDL2.dll",
|
||||
}
|
||||
else
|
||||
links {
|
||||
"SDL.dll",
|
||||
}
|
||||
end
|
||||
|
||||
configuration { "mingw*" }
|
||||
linkoptions{
|
||||
"-municode",
|
||||
@ -59,10 +69,6 @@ function maintargetosdoptions(_target)
|
||||
libdirs {
|
||||
path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64")
|
||||
}
|
||||
configuration { "vs*" }
|
||||
links {
|
||||
"SDL2",
|
||||
}
|
||||
configuration {}
|
||||
elseif _OPTIONS["targetos"]=="haiku" then
|
||||
links {
|
||||
@ -282,13 +288,6 @@ elseif BASE_TARGETOS=="os2" then
|
||||
}
|
||||
end
|
||||
|
||||
configuration { "mingw*" }
|
||||
linkoptions {
|
||||
"-static"
|
||||
}
|
||||
|
||||
configuration { }
|
||||
|
||||
|
||||
project ("osd_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
|
||||
@ -442,6 +441,15 @@ if _OPTIONS["with-tools"] then
|
||||
}
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
if _OPTIONS["SDL_LIBVER"]=="sdl2" then
|
||||
links {
|
||||
"SDL2.dll",
|
||||
}
|
||||
else
|
||||
links {
|
||||
"SDL.dll",
|
||||
}
|
||||
end
|
||||
linkoptions{
|
||||
"-municode",
|
||||
}
|
||||
|
@ -28,6 +28,11 @@ function maintargetosdoptions(_target)
|
||||
}
|
||||
end
|
||||
|
||||
links {
|
||||
"comctl32",
|
||||
"comdlg32",
|
||||
}
|
||||
|
||||
local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _target ..".rc"
|
||||
|
||||
if os.isfile(rcfile) then
|
||||
|
@ -12,6 +12,11 @@
|
||||
#ifndef __SDLVIDEO__
|
||||
#define __SDLVIDEO__
|
||||
|
||||
#if defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "osdsdl.h"
|
||||
|
||||
//============================================================
|
||||
|
@ -9,6 +9,11 @@
|
||||
//
|
||||
//============================================================
|
||||
|
||||
#ifdef SDLMAME_WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
// standard SDL headers
|
||||
#include "sdlinc.h"
|
||||
|
||||
@ -60,16 +65,16 @@
|
||||
// minimum window dimension
|
||||
#define MIN_WINDOW_DIM 200
|
||||
|
||||
//#ifndef SDLMAME_WIN32
|
||||
#define WMSZ_TOP (0)
|
||||
#define WMSZ_BOTTOM (1)
|
||||
#ifndef SDLMAME_WIN32
|
||||
#define WMSZ_TOP (0)
|
||||
#define WMSZ_BOTTOM (1)
|
||||
#define WMSZ_BOTTOMLEFT (2)
|
||||
#define WMSZ_BOTTOMRIGHT (3)
|
||||
#define WMSZ_LEFT (4)
|
||||
#define WMSZ_LEFT (4)
|
||||
#define WMSZ_TOPLEFT (5)
|
||||
#define WMSZ_TOPRIGHT (6)
|
||||
#define WMSZ_RIGHT (7)
|
||||
//#endif
|
||||
#define WMSZ_RIGHT (7)
|
||||
#endif
|
||||
|
||||
//============================================================
|
||||
// GLOBAL VARIABLES
|
||||
|
Loading…
Reference in New Issue
Block a user