aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/views
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-17 15:28:56 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-17 15:28:56 +0000
commit2882c57910e0e91fa0be070871a9258548364825 (patch)
tree6d7203e6ad3461c4705332a6a26d224f8577785f /src/views
parentb3470c8c421ee8f367673a67c3408507cee04434 (diff)
Fix SampleApp busted images with --picture on windows.
Review URL: https://codereview.appspot.com/6942060 git-svn-id: http://skia.googlecode.com/svn/trunk@6842 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/views')
-rw-r--r--src/views/win/skia_win.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/views/win/skia_win.cpp b/src/views/win/skia_win.cpp
index 2643cc8799..327b0cdb96 100644
--- a/src/views/win/skia_win.cpp
+++ b/src/views/win/skia_win.cpp
@@ -7,6 +7,9 @@
*/
#include <Windows.h>
#include <tchar.h>
+
+#include "SkApplication.h"
+
#define MAX_LOADSTRING 100
// Global Variables:
@@ -48,6 +51,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
}
}
+ application_term();
+
return (int) msg.wParam;
}
@@ -118,12 +123,12 @@ char* tchar_to_utf8(const TCHAR* str) {
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow, LPTSTR lpCmdLine)
{
- HWND hWnd;
+ application_init();
hInst = hInstance; // Store instance handle in our global variable
- hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
- CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
+ HWND hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
+ CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
if (!hWnd)
{
@@ -145,7 +150,6 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow, LPTSTR lpCmdLine)
for (int i = 0; i < argc; ++i) {
free(argv[i]);
}
-
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);