Use CONTROLLER_P1_AUTO. Removed hidSetControllerLayout calls for the default-layout.

This commit is contained in:
yellows8 2018-01-19 14:05:22 -05:00
parent 45cb8abbf5
commit 46acf316d3
2 changed files with 2 additions and 8 deletions

View File

@ -15,15 +15,12 @@ int main(int argc, char **argv)
//the row and column where you want your cursor to move //the row and column where you want your cursor to move
printf("\x1b[16;20HHello World!"); printf("\x1b[16;20HHello World!");
//"Safe default, single Joy-Con have buttons/sticks rotated for orientation"
hidSetControllerLayout(CONTROLLER_PLAYER_1, LAYOUT_DEFAULT);
while(appletMainLoop()) while(appletMainLoop())
{ {
//Scan all the inputs. This should be done once for each frame //Scan all the inputs. This should be done once for each frame
hidScanInput(); hidScanInput();
if ((hidKeysDown(CONTROLLER_PLAYER_1) | hidKeysDown(CONTROLLER_HANDHELD)) & KEY_PLUS) break; if (hidKeysDown(CONTROLLER_P1_AUTO) & KEY_PLUS) break;
gfxFlushBuffers(); gfxFlushBuffers();
gfxSwapBuffers(); gfxSwapBuffers();

View File

@ -25,15 +25,12 @@ int main(int argc, char **argv)
//gfxConfigureAutoResolutionDefault(true);//Set current resolution automatically depending on current/changed OperationMode. Only use this when using gfxInitResolution*(). //gfxConfigureAutoResolutionDefault(true);//Set current resolution automatically depending on current/changed OperationMode. Only use this when using gfxInitResolution*().
//Note that while the above commented code enables 1080p for docked-mode, this example only draws a 720p image, with the rest of the screen being left at white. //Note that while the above commented code enables 1080p for docked-mode, this example only draws a 720p image, with the rest of the screen being left at white.
//"Safe default, single Joy-Con have buttons/sticks rotated for orientation"
hidSetControllerLayout(CONTROLLER_PLAYER_1, LAYOUT_DEFAULT);
while(appletMainLoop()) while(appletMainLoop())
{ {
//Scan all the inputs. This should be done once for each frame //Scan all the inputs. This should be done once for each frame
hidScanInput(); hidScanInput();
if ((hidKeysDown(CONTROLLER_PLAYER_1) | hidKeysDown(CONTROLLER_HANDHELD)) & KEY_PLUS) break; if (hidKeysDown(CONTROLLER_P1_AUTO) & KEY_PLUS) break;
framebuf = gfxGetFramebuffer((u32*)&width, (u32*)&height); framebuf = gfxGetFramebuffer((u32*)&width, (u32*)&height);
framebuf32 = (u32*)framebuf; framebuf32 = (u32*)framebuf;