Fix broken CRLF, and minor fixes for VC12.

This commit is contained in:
Themaister 2012-10-24 17:17:01 +02:00
parent 53868033b7
commit c2674328ec
3 changed files with 1406 additions and 1416 deletions

5
file.c
View File

@ -213,10 +213,7 @@ static ssize_t read_rom_file(FILE *file, void **buf)
if (file == NULL) // stdin if (file == NULL) // stdin
{ {
#if defined(_WIN32) && !defined(_XBOX) #if defined(_WIN32) && !defined(_XBOX)
//TODO: Warning on MSVC 2012 - warning C4996: 'setmode': _setmode(0, O_BINARY);
//The POSIX name for this item is deprecated. Instead,
//use the ISO C++ conformant name: _setmode
setmode(0, O_BINARY);
#endif #endif
RARCH_LOG("Reading ROM from stdin ...\n"); RARCH_LOG("Reading ROM from stdin ...\n");

View File

@ -16,13 +16,12 @@
// Win32/WGL context. // Win32/WGL context.
// TODO: Rewrite initializer lists - not supported on MSVC 2010/2012
#include "../../driver.h" #include "../../driver.h"
#include "../gfx_context.h" #include "../gfx_context.h"
#include "../gl_common.h" #include "../gl_common.h"
#include "../gfx_common.h" #include "../gfx_common.h"
#include <windows.h> #include <windows.h>
#include <string.h>
#define IDI_ICON 1 #define IDI_ICON 1
#define MAX_MONITORS 9 #define MAX_MONITORS 9
@ -262,11 +261,8 @@ static bool gfx_ctx_set_video_mode(
(void)bits; (void)bits;
DWORD style; DWORD style;
#if defined(_WIN32)
MONITORINFOEX current_mon; MONITORINFOEX current_mon;
#else memset(&current_mon, 0, sizeof(current_mon));
MONITORINFOEX current_mon = {{0}};
#endif
current_mon.cbSize = sizeof(MONITORINFOEX); current_mon.cbSize = sizeof(MONITORINFOEX);
if (!g_last_hm) if (!g_last_hm)
g_last_hm = MonitorFromWindow(GetDesktopWindow(), MONITOR_DEFAULTTONEAREST); g_last_hm = MonitorFromWindow(GetDesktopWindow(), MONITOR_DEFAULTTONEAREST);
@ -385,11 +381,8 @@ static void gfx_ctx_destroy(void)
if (g_restore_desktop) if (g_restore_desktop)
{ {
#if defined(_WIN32)
MONITORINFOEX current_mon; MONITORINFOEX current_mon;
#else memset(&current_mon, 0, sizeof(current_mon));
MONITORINFOEX current_mon = {{0}};
#endif
current_mon.cbSize = sizeof(MONITORINFOEX); current_mon.cbSize = sizeof(MONITORINFOEX);
GetMonitorInfo(g_last_hm, (MONITORINFO*)&current_mon); GetMonitorInfo(g_last_hm, (MONITORINFO*)&current_mon);
ChangeDisplaySettingsEx(current_mon.szDevice, NULL, NULL, 0, NULL); ChangeDisplaySettingsEx(current_mon.szDevice, NULL, NULL, 0, NULL);