キーボードのハード的な仕様で、組み合わせによっては
3つ以上のキーの入力を受け付けない場合があります。
下記のプログラムで試してみてください。
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )
{
int Cr , PadInput ;
if( DxLib_Init() == -1 ) // DXライブラリ初期化処理
{
return -1; // エラーが起きたら直ちに終了
}
// 白色の値を取得
Cr = GetColor( 255 , 255 , 255 ) ;
SetDrawScreen(DX_SCREEN_BACK);
PadInput = GetJoypadInputState( DX_INPUT_KEY_PAD1 ) ;
while( ( PadInput & PAD_INPUT_START ) == 0 )
{
// メッセージ処理
if( ProcessMessage() == -1 )
{
break ; // エラーが発生したらループを抜ける
}
// 入力を取得
PadInput = GetJoypadInputState( DX_INPUT_KEY_PAD1 ) ;
ClearDrawScreen();
DrawString( 0,0,"ESCで終了します",Cr);
if( ( PadInput & PAD_INPUT_UP ) != 0 ) DrawString( 0,32,"上",Cr);
if( ( PadInput & PAD_INPUT_DOWN ) != 0 ) DrawString(16,32,"下",Cr);
if( ( PadInput & PAD_INPUT_LEFT ) != 0 ) DrawString(32,32,"左",Cr);
if( ( PadInput & PAD_INPUT_RIGHT) != 0 ) DrawString(48,32,"右",Cr);
ScreenFlip();
}
DxLib_End() ; // DXライブラリ使用の終了処理
return 0 ; // ソフトの終了
}