Some code cleanup
This commit is contained in:
parent
5ef0bad6c8
commit
d72242d081
|
@ -13,3 +13,4 @@ local.properties
|
|||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
build
|
||||
|
|
|
@ -9,11 +9,11 @@ import emu.project64.jni.SettingsID;
|
|||
import emu.project64.util.Strings;
|
||||
import emu.project64.util.Utility;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.text.Html;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
@ -34,7 +34,8 @@ public class AboutActivity extends AppCompatActivity
|
|||
super.onCreate( savedInstanceState );
|
||||
setContentView( R.layout.about_activity );
|
||||
|
||||
// Add the tool bar to the activity (which supports the fancy menu/arrow animation)
|
||||
m_title_clicks = 0;
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById( R.id.toolbar );
|
||||
toolbar.setTitle( getString(R.string.app_name) + " " + NativeExports.appVersion() );
|
||||
setSupportActionBar( toolbar );
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package emu.project64;
|
||||
|
||||
import android.database.DataSetObserver;
|
||||
import android.support.v4.view.PagerAdapter;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import emu.project64.util.Strings;
|
|||
import emu.project64.util.Utility;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
|
@ -51,14 +51,6 @@ import android.net.Uri;
|
|||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.support.v4.content.res.ResourcesCompat;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ClickableSpan;
|
||||
|
@ -75,6 +67,16 @@ import android.widget.ListAdapter;
|
|||
import android.widget.TextView;
|
||||
import android.widget.TextView.BufferType;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class GalleryActivity extends AppCompatActivity implements IabBroadcastListener
|
||||
{
|
||||
//Progress dialog for ROM scan
|
||||
|
@ -388,9 +390,9 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
{
|
||||
switch( item.getItemId() )
|
||||
{
|
||||
case R.id.menuItem_gameDir:
|
||||
Intent intent = new Intent(this, ScanRomsActivity.class);
|
||||
startActivityForResult( intent, GAME_DIR_REQUEST_CODE );
|
||||
case R.id.menuItem_GameDir:
|
||||
Intent ScanRomsIntent = new Intent(this, ScanRomsActivity.class);
|
||||
startActivityForResult( ScanRomsIntent, GAME_DIR_REQUEST_CODE );
|
||||
return true;
|
||||
case R.id.menuItem_settings:
|
||||
Intent SettingsIntent = new Intent(this, SettingsActivity.class);
|
||||
|
@ -605,7 +607,6 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
{
|
||||
NativeExports.LoadGame(item.romFile.getAbsolutePath());
|
||||
StartGameMenu(true);
|
||||
Log.d("GalleryActivity", "onGalleryItemLongClick 4");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import java.util.List;
|
|||
import emu.project64.R;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -18,6 +17,8 @@ import android.view.ViewGroup;
|
|||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class GalleryItem
|
||||
{
|
||||
public final String goodName;
|
||||
|
|
|
@ -284,7 +284,7 @@ public class SplashActivity extends AppCompatActivity implements ExtractAssetsLi
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
Log.e( "Splash", "extractAssetsTaskLauncher - start");
|
||||
Log.i( "Splash", "extractAssetsTaskLauncher - start");
|
||||
TOTAL_ASSETS = 0;
|
||||
CountTotalAssetFiles(SOURCE_DIR);
|
||||
mAssetsExtracted = 0;
|
||||
|
@ -312,12 +312,8 @@ public class SplashActivity extends AppCompatActivity implements ExtractAssetsLi
|
|||
}
|
||||
mTextView.setText( R.string.assetExtractor_finished );
|
||||
NativeExports.UISettingsSaveDword(UISettingID.Asserts_Version.getValue(), ASSET_VERSION);
|
||||
|
||||
// Launch gallery activity
|
||||
Intent intent = new Intent( this, GalleryActivity.class );
|
||||
this.startActivity( intent );
|
||||
|
||||
// We never want to come back to this activity, so finish it
|
||||
finish();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2,13 +2,14 @@ package emu.project64.game;
|
|||
|
||||
import emu.project64.jni.NativeExports;
|
||||
import emu.project64.jni.SystemEvent;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class GameActivity extends Activity
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class GameActivity extends AppCompatActivity
|
||||
{
|
||||
private GameLifecycleHandler mLifecycleHandler;
|
||||
@SuppressWarnings("unused")
|
||||
|
|
|
@ -1,17 +1,10 @@
|
|||
package emu.project64.jni;
|
||||
|
||||
/**
|
||||
* Calls made between the native input-android library and Java. Any function names changed here
|
||||
* should also be changed in the corresponding C code, and vice versa.
|
||||
*
|
||||
* @see /Source/Android/PluginInput/Main.cpp
|
||||
* @see CoreInterface
|
||||
*/
|
||||
public class NativeVideo
|
||||
{
|
||||
static
|
||||
{
|
||||
System.loadLibrary( "Project64-gfx" );
|
||||
System.loadLibrary( "Project64-video" );
|
||||
}
|
||||
|
||||
public static native void UpdateScreenRes(int ScreenWidth, int ScreenHeight);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package emu.project64.settings;
|
||||
|
||||
import emu.project64.R;
|
||||
import android.support.v7.preference.Preference;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
public class AdvancedFragment extends BaseSettingsFragment
|
||||
{
|
||||
|
|
|
@ -7,16 +7,16 @@ import emu.project64.profile.ControllerProfileActivity;
|
|||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.support.v7.preference.PreferenceFragmentCompat;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
|
||||
public abstract class BaseSettingsFragment extends PreferenceFragmentCompat
|
||||
{
|
||||
private static final String DIALOG_FRAGMENT_TAG = "android.support.v7.preference.PreferenceFragment.DIALOG";
|
||||
private static final String DIALOG_FRAGMENT_TAG = "androidx.preference.PreferenceFragment.DIALOG";
|
||||
|
||||
protected abstract int getXml();
|
||||
protected abstract int getTitleId();
|
||||
|
|
|
@ -7,9 +7,9 @@ import emu.project64.jni.SettingsID;
|
|||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.view.MenuItem;
|
||||
|
||||
public class GameSettingsActivity extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener
|
||||
|
|
|
@ -3,7 +3,7 @@ package emu.project64.settings;
|
|||
import emu.project64.R;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.support.v7.preference.DialogPreference;
|
||||
import androidx.preference.DialogPreference;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.SeekBar;
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@ package emu.project64.settings;
|
|||
|
||||
import emu.project64.R;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.preference.DialogPreference;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.support.v7.preference.PreferenceDialogFragmentCompat;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.preference.DialogPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceDialogFragmentCompat;
|
||||
import android.view.View;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
|
|
|
@ -3,7 +3,7 @@ package emu.project64.settings;
|
|||
import emu.project64.R;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.support.v7.preference.ListPreference;
|
||||
import androidx.preference.ListPreference;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
public class TwoLinesListPreference extends ListPreference
|
||||
|
|
|
@ -7,9 +7,6 @@ import java.io.InputStream;
|
|||
import java.io.InputStreamReader;
|
||||
import emu.project64.Project64Application;
|
||||
|
||||
/**
|
||||
* Utility class which collects a bunch of commonly used methods into one class.
|
||||
*/
|
||||
public final class Utility
|
||||
{
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
*.c
|
||||
*.cpp
|
||||
*.h
|
||||
*.vcproj
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
||||
*.dsp
|
||||
*.plg
|
|
@ -0,0 +1,27 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
project("png")
|
||||
|
||||
add_library(png STATIC
|
||||
png.c
|
||||
pngerror.c
|
||||
pngget.c
|
||||
pngmem.c
|
||||
pngpread.c
|
||||
pngread.c
|
||||
pngrio.c
|
||||
pngrtran.c
|
||||
pngrutil.c
|
||||
pngset.c
|
||||
pngtest.c
|
||||
pngtrans.c
|
||||
pngwio.c
|
||||
pngwrite.c
|
||||
pngwtran.c
|
||||
pngwutil.c)
|
||||
|
||||
add_definitions(-DANDROID)
|
||||
|
||||
target_link_libraries(png)
|
|
@ -0,0 +1,12 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
project("Project64-input-android")
|
||||
|
||||
add_library(Project64-input-android SHARED
|
||||
Main.cpp)
|
||||
|
||||
add_definitions(-DANDROID)
|
||||
|
||||
target_link_libraries(Project64-input-android)
|
|
@ -0,0 +1,23 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
project("Project64-rsp-hle")
|
||||
|
||||
add_library(Project64-rsp-hle SHARED
|
||||
alist.cpp
|
||||
alist_audio.cpp
|
||||
alist_naudio.cpp
|
||||
alist_nead.cpp
|
||||
audio.cpp
|
||||
cicx105.cpp
|
||||
hle.cpp
|
||||
jpeg.cpp
|
||||
main.cpp
|
||||
mem.cpp
|
||||
mp3.cpp
|
||||
musyx.cpp)
|
||||
|
||||
add_definitions(-DANDROID)
|
||||
|
||||
target_link_libraries(Project64-rsp-hle)
|
|
@ -0,0 +1,19 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
project("Project64-audio-android")
|
||||
include_directories(..)
|
||||
|
||||
add_library(Project64-audio-android SHARED
|
||||
Driver/OpenSLES.cpp
|
||||
Driver/SoundBase.cpp
|
||||
AudioMain.cpp
|
||||
AudioSettings.cpp
|
||||
trace.cpp)
|
||||
|
||||
add_definitions(-DANDROID)
|
||||
|
||||
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../Common ${CMAKE_CURRENT_BINARY_DIR}/Common)
|
||||
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../Settings ${CMAKE_CURRENT_BINARY_DIR}/Settings)
|
||||
target_link_libraries(Project64-audio-android Common settings log OpenSLES)
|
|
@ -0,0 +1,76 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
project("Project64-video")
|
||||
include_directories(..)
|
||||
include_directories(../3rdParty)
|
||||
include_directories(./Renderer/inc)
|
||||
|
||||
add_library(Project64-video SHARED
|
||||
3dmath.cpp
|
||||
Android.cpp
|
||||
Combine.cpp
|
||||
Config.cpp
|
||||
CRC.cpp
|
||||
Debugger.cpp
|
||||
DepthBufferRender.cpp
|
||||
F3DTEXA.cpp
|
||||
FBtoScreen.cpp
|
||||
Main.cpp
|
||||
rdp.cpp
|
||||
ScreenResolution.cpp
|
||||
Settings.cpp
|
||||
TexBuffer.cpp
|
||||
TexCache.cpp
|
||||
trace.cpp
|
||||
turbo3D.cpp
|
||||
ucode.cpp
|
||||
ucode00.cpp
|
||||
ucode01.cpp
|
||||
ucode02.cpp
|
||||
ucode03.cpp
|
||||
ucode04.cpp
|
||||
ucode05.cpp
|
||||
ucode06.cpp
|
||||
ucode07.cpp
|
||||
ucode08.cpp
|
||||
ucode09.cpp
|
||||
ucode09rdp.cpp
|
||||
ucodeFB.cpp
|
||||
Util.cpp
|
||||
Ext_TxFilter.cpp
|
||||
Renderer/OGLEScombiner.cpp
|
||||
Renderer/OGLESgeometry.cpp
|
||||
Renderer/OGLESglitchmain.cpp
|
||||
Renderer/OGLEStextures.cpp
|
||||
Renderer/OGLESwrappers.cpp
|
||||
Renderer/Renderer.cpp
|
||||
TextureEnhancer/TxFilterExport.cpp
|
||||
TextureEnhancer/TxFilter.cpp
|
||||
TextureEnhancer/TxCache.cpp
|
||||
TextureEnhancer/TxTexCache.cpp
|
||||
TextureEnhancer/TxHiResCache.cpp
|
||||
TextureEnhancer/TxQuantize.cpp
|
||||
TextureEnhancer/TxUtil.cpp
|
||||
TextureEnhancer/TextureFilters.cpp
|
||||
TextureEnhancer/TextureFilters_2xsai.cpp
|
||||
TextureEnhancer/TextureFilters_hq2x.cpp
|
||||
TextureEnhancer/TextureFilters_hq4x.cpp
|
||||
TextureEnhancer/TxImage.cpp
|
||||
TextureEnhancer/TxReSample.cpp
|
||||
TextureEnhancer/TxDbg.cpp
|
||||
TextureEnhancer/tc-1.1+/fxt1.c
|
||||
TextureEnhancer/tc-1.1+/dxtn.c
|
||||
TextureEnhancer/tc-1.1+/wrapper.c
|
||||
TextureEnhancer/tc-1.1+/texstore.c)
|
||||
|
||||
add_definitions(-DANDROID)
|
||||
add_definitions(-DNOSSE)
|
||||
add_definitions(-DUSE_GLES)
|
||||
|
||||
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../3rdParty/png ${CMAKE_CURRENT_BINARY_DIR}/3rdParty/png)
|
||||
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../3rdParty/zlib ${CMAKE_CURRENT_BINARY_DIR}/3rdParty/zlib)
|
||||
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../Common ${CMAKE_CURRENT_BINARY_DIR}/Common)
|
||||
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../Settings ${CMAKE_CURRENT_BINARY_DIR}/Settings)
|
||||
target_link_libraries(Project64-video png zlib Common settings GLESv2 log)
|
|
@ -0,0 +1,12 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
project("settings")
|
||||
|
||||
add_library(settings STATIC
|
||||
Settings.cpp)
|
||||
|
||||
add_definitions(-DANDROID)
|
||||
|
||||
target_link_libraries(settings)
|
Loading…
Reference in New Issue