Compatibility getch() for VS 2008/2013

This commit is contained in:
Ender's Games 2018-09-20 17:47:00 -04:00
parent 88f97ae431
commit 0adc6b2bce
1 changed files with 5 additions and 3 deletions

View File

@ -108,11 +108,13 @@ int setconfig(wchar** arg,int cl)
#if !defined(DEF_CONSOLE)
#if defined(linux) || defined(_ANDROID)
#define DEF_CONSOLE
#elif defined(_WIN32)
#include <conio.h>
#endif
#endif
#if defined(_WIN32)
#include <conio.h>
#endif
void cli_pause()
{
#ifdef DEF_CONSOLE
@ -121,7 +123,7 @@ void cli_pause()
#if defined(_WIN32)
printf("\nPress a key to exit.\n");
getch();
_getch();
#else
printf("\nPress enter to exit.\n");
char c = getchar();