Compatibility getch() for VS 2008/2013
This commit is contained in:
parent
88f97ae431
commit
0adc6b2bce
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue