forked from 0ad/0ad
Removes mostly useless video memory detection, fixes another crash with Nvidia Optimus on Windows, fixes #2145, #2138
This was SVN commit r13891.
This commit is contained in:
parent
e488ed09f5
commit
2a613f8236
@ -92,12 +92,11 @@ std::wstring DriverInfo()
|
|||||||
|
|
||||||
size_t MemorySizeMiB()
|
size_t MemorySizeMiB()
|
||||||
{
|
{
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
// TODO: not implemented, SDL_GetVideoInfo only works on some platforms in SDL 1.2
|
||||||
|
// and no replacement is available in SDL2, and it can crash with Nvidia Optimus
|
||||||
|
// see http://trac.wildfiregames.com/ticket/2145
|
||||||
|
debug_warn(L"MemorySizeMiB not implemented");
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
|
||||||
// (maybe add the size of the framebuffer?)
|
|
||||||
return (SDL_GetVideoInfo()->video_mem) / 1048576; // [MiB]
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace gfx
|
} // namespace gfx
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (c) 2010 Wildfire Games
|
/* Copyright (c) 2013 Wildfire Games
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@ -41,6 +41,9 @@ LIB_API std::wstring CardName();
|
|||||||
**/
|
**/
|
||||||
LIB_API std::wstring DriverInfo();
|
LIB_API std::wstring DriverInfo();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* not implemented
|
||||||
|
**/
|
||||||
LIB_API size_t MemorySizeMiB();
|
LIB_API size_t MemorySizeMiB();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user