filename | android/src/org/lxdream/LxdreamActivity.java |
changeset | 1241:74f8e11ab4b8 |
prev | 1239:be3121267597 |
next | 1245:01e0020adf88 |
author | nkeynes |
date | Tue Feb 28 17:27:39 2012 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Pass the application home dir through to the native code, so we can use it as the default data directory |
view | annotate | diff | log | raw |
1 /**
2 * $Id$
3 *
4 * Main Lxdream activity
5 *
6 * Copyright (c) 2011 Nathan Keynes.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
19 package org.lxdream;
21 import android.app.Activity;
22 import android.content.Context;
23 import android.os.Bundle;
24 import android.util.Log;
25 import android.view.WindowManager;
27 import java.io.File;
30 public class LxdreamActivity extends Activity {
31 LxdreamView view;
33 @Override
34 protected void onCreate(Bundle bundle) {
35 super.onCreate(bundle);
36 Context ctx = getApplication();
37 Dreamcast.init( ctx.getFilesDir().toString() );
38 view = new LxdreamView(ctx);
39 setContentView(view);
40 }
42 @Override
43 protected void onPause() {
44 super.onPause();
45 view.onPause();
46 }
48 @Override
49 protected void onResume() {
50 super.onResume();
51 view.onResume();
52 }
53 }
.