Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Side by Side Diff: nacltoons/proj.nacl/main.cc

Issue 14851014: [nacltoons] Move nacl-specific build to proj.nacl (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nacltoons/proj.nacl/Makefile ('k') | nacltoons/proj.win/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WIN32
6
7 #include "CCStdC.h" 5 #include "CCStdC.h"
8 #include "cocos2d.h" 6 #include "cocos2d.h"
9 #include "CCInstance.h" 7 #include "CCInstance.h"
10 #include "CCModule.h" 8 #include "CCModule.h"
11 9
12 #include <stdlib.h> 10 #include <stdlib.h>
13 #include <stdio.h> 11 #include <stdio.h>
14 #include <unistd.h> 12 #include <unistd.h>
15 #include <string> 13 #include <string>
16 #include <fcntl.h> 14 #include <fcntl.h>
(...skipping 22 matching lines...) Expand all
39 int rtn = CCApplication::sharedApplication()->run(); 37 int rtn = CCApplication::sharedApplication()->run();
40 fprintf(stderr, "app run returned: %d\n", rtn); 38 fprintf(stderr, "app run returned: %d\n", rtn);
41 return NULL; 39 return NULL;
42 } 40 }
43 41
44 namespace pp { 42 namespace pp {
45 Module* CreateModule() { 43 Module* CreateModule() {
46 return new CocosPepperModule(); 44 return new CocosPepperModule();
47 } 45 }
48 } 46 }
49
50 #else
51
52 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Window s headers
53 // Windows Header Files:
54 #include <windows.h>
55 #include <tchar.h>
56
57 // C RunTime Header Files
58 #include "CCStdC.h"
59
60
61 #include "app_delegate.h"
62 #include "CCEGLView.h"
63
64 USING_NS_CC;
65 AppDelegate g_app;
66
67 int APIENTRY _tWinMain(HINSTANCE hInstance,
68 HINSTANCE hPrevInstance,
69 LPTSTR lpCmdLine,
70 int nCmdShow)
71 {
72 UNREFERENCED_PARAMETER(hPrevInstance);
73 UNREFERENCED_PARAMETER(lpCmdLine);
74
75 // create the application instance
76 CCEGLView* eglView = CCEGLView::sharedOpenGLView();
77 eglView->setViewName("HelloCpp");
78 eglView->setFrameSize(2048, 1536);
79 // The resolution of ipad3 is very large. In general, PC's resolution is sma ller than it.
80 // So we need to invoke 'setFrameZoomFactor'(only valid on desktop(win32, ma c, linux)) to make the window smaller.
81 eglView->setFrameZoomFactor(0.4f);
82 return CCApplication::sharedApplication()->run();
83 }
84
85 #endif
OLDNEW
« no previous file with comments | « nacltoons/proj.nacl/Makefile ('k') | nacltoons/proj.win/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698