mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-05-19 08:10:36 +00:00
commit
cc00d25417
16 changed files with 1876 additions and 1713 deletions
|
|
@ -15,8 +15,8 @@ android {
|
|||
applicationId "com.vectras.vm"
|
||||
minSdk minApi
|
||||
targetSdk targetApi
|
||||
versionCode 63
|
||||
versionName "3.5.9"
|
||||
versionCode 64
|
||||
versionName "3.6.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
multiDexEnabled true
|
||||
|
||||
|
|
|
|||
|
|
@ -15,189 +15,172 @@ import android.widget.ImageView;
|
|||
* Abstract interface between the VncCanvas and the bitmap and pixel data
|
||||
* buffers that actually contain the data. This allows for implementations that
|
||||
* use smaller bitmaps or buffers to save memory.
|
||||
*
|
||||
*
|
||||
* @author Michael A. MacDonald
|
||||
*
|
||||
*
|
||||
*/
|
||||
abstract class AbstractBitmapData {
|
||||
int framebufferwidth;
|
||||
int framebufferheight;
|
||||
int bitmapwidth;
|
||||
int bitmapheight;
|
||||
RfbProto rfb;
|
||||
Bitmap mbitmap;
|
||||
int bitmapPixels[];
|
||||
Canvas memGraphics;
|
||||
boolean waitingForInput;
|
||||
VncCanvas vncCanvas;
|
||||
private AbstractBitmapDrawable drawable;
|
||||
int framebufferwidth;
|
||||
int framebufferheight;
|
||||
int bitmapwidth;
|
||||
int bitmapheight;
|
||||
RfbProto rfb;
|
||||
Bitmap mbitmap;
|
||||
int bitmapPixels[];
|
||||
Canvas memGraphics;
|
||||
boolean waitingForInput;
|
||||
VncCanvas vncCanvas;
|
||||
private AbstractBitmapDrawable drawable;
|
||||
|
||||
AbstractBitmapData(RfbProto p, VncCanvas c) {
|
||||
rfb = p;
|
||||
vncCanvas = c;
|
||||
framebufferwidth = rfb.framebufferWidth;
|
||||
framebufferheight = rfb.framebufferHeight;
|
||||
}
|
||||
AbstractBitmapData(RfbProto p, VncCanvas c) {
|
||||
rfb = p;
|
||||
vncCanvas = c;
|
||||
framebufferwidth = rfb.framebufferWidth;
|
||||
framebufferheight = rfb.framebufferHeight;
|
||||
}
|
||||
|
||||
synchronized void doneWaiting() {
|
||||
waitingForInput = false;
|
||||
}
|
||||
synchronized void doneWaiting() {
|
||||
waitingForInput = false;
|
||||
}
|
||||
|
||||
final void invalidateMousePosition() {
|
||||
if (vncCanvas.connection.getUseLocalCursor()) {
|
||||
if (drawable == null)
|
||||
drawable = createDrawable();
|
||||
drawable.setCursorRect(vncCanvas.mouseX, vncCanvas.mouseY);
|
||||
vncCanvas.invalidate(drawable.cursorRect);
|
||||
}
|
||||
}
|
||||
final void invalidateMousePosition() {
|
||||
if (vncCanvas.connection.getUseLocalCursor()) {
|
||||
if (drawable == null)
|
||||
drawable = createDrawable();
|
||||
drawable.setCursorRect(vncCanvas.mouseX, vncCanvas.mouseY);
|
||||
vncCanvas.invalidate(drawable.cursorRect);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The smallest scale supported by the implementation; the scale at
|
||||
* which the bitmap would be smaller than the screen
|
||||
*/
|
||||
float getMinimumScale() {
|
||||
double scale = 0.75;
|
||||
int displayWidth = vncCanvas.getWidth();
|
||||
int displayHeight = vncCanvas.getHeight();
|
||||
for (; scale >= 0; scale -= 0.25) {
|
||||
if (scale * bitmapwidth < displayWidth
|
||||
|| scale * bitmapheight < displayHeight)
|
||||
break;
|
||||
}
|
||||
return (float) (scale + 0.25);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return The smallest scale supported by the implementation; the scale at
|
||||
* which the bitmap would be smaller than the screen
|
||||
*/
|
||||
float getMinimumScale() {
|
||||
double scale = 0.75;
|
||||
int displayWidth = vncCanvas.getWidth();
|
||||
int displayHeight = vncCanvas.getHeight();
|
||||
for (; scale >= 0; scale -= 0.25) {
|
||||
if (scale * bitmapwidth < displayWidth
|
||||
|| scale * bitmapheight < displayHeight)
|
||||
break;
|
||||
}
|
||||
return (float) (scale + 0.25);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a request through the protocol to get the data for the currently
|
||||
* held bitmap
|
||||
*
|
||||
* @param incremental
|
||||
* True if we want incremental update; false for full update
|
||||
*/
|
||||
abstract void writeFullUpdateRequest(boolean incremental)
|
||||
throws IOException;
|
||||
/**
|
||||
* Send a request through the protocol to get the data for the currently
|
||||
* held bitmap
|
||||
*
|
||||
* @param incremental True if we want incremental update; false for full update
|
||||
*/
|
||||
abstract void writeFullUpdateRequest(boolean incremental)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Determine if a rectangle in full-frame coordinates can be drawn in the
|
||||
* existing buffer
|
||||
*
|
||||
* @param x
|
||||
* Top left x
|
||||
* @param y
|
||||
* Top left y
|
||||
* @param w
|
||||
* width (pixels)
|
||||
* @param h
|
||||
* height (pixels)
|
||||
* @return True if entire rectangle fits into current screen buffer, false
|
||||
* otherwise
|
||||
*/
|
||||
abstract boolean validDraw(int x, int y, int w, int h);
|
||||
/**
|
||||
* Determine if a rectangle in full-frame coordinates can be drawn in the
|
||||
* existing buffer
|
||||
*
|
||||
* @param x Top left x
|
||||
* @param y Top left y
|
||||
* @param w width (pixels)
|
||||
* @param h height (pixels)
|
||||
* @return True if entire rectangle fits into current screen buffer, false
|
||||
* otherwise
|
||||
*/
|
||||
abstract boolean validDraw(int x, int y, int w, int h);
|
||||
|
||||
/**
|
||||
* Return an offset in the bitmapPixels array of a point in full-frame
|
||||
* coordinates
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @return Offset in bitmapPixels array of color data for that point
|
||||
*/
|
||||
abstract int offset(int x, int y);
|
||||
/**
|
||||
* Return an offset in the bitmapPixels array of a point in full-frame
|
||||
* coordinates
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @return Offset in bitmapPixels array of color data for that point
|
||||
*/
|
||||
abstract int offset(int x, int y);
|
||||
|
||||
/**
|
||||
* Update pixels in the bitmap with data from the bitmapPixels array,
|
||||
* positioned in full-frame coordinates
|
||||
*
|
||||
* @param x
|
||||
* Top left x
|
||||
* @param y
|
||||
* Top left y
|
||||
* @param w
|
||||
* width (pixels)
|
||||
* @param h
|
||||
* height (pixels)
|
||||
*/
|
||||
abstract void updateBitmap(int x, int y, int w, int h);
|
||||
/**
|
||||
* Update pixels in the bitmap with data from the bitmapPixels array,
|
||||
* positioned in full-frame coordinates
|
||||
*
|
||||
* @param x Top left x
|
||||
* @param y Top left y
|
||||
* @param w width (pixels)
|
||||
* @param h height (pixels)
|
||||
*/
|
||||
abstract void updateBitmap(int x, int y, int w, int h);
|
||||
|
||||
/**
|
||||
* Create drawable appropriate for this data
|
||||
*
|
||||
* @return drawable
|
||||
*/
|
||||
abstract AbstractBitmapDrawable createDrawable();
|
||||
/**
|
||||
* Create drawable appropriate for this data
|
||||
*
|
||||
* @return drawable
|
||||
*/
|
||||
abstract AbstractBitmapDrawable createDrawable();
|
||||
|
||||
/**
|
||||
* Call in UI thread; tell ImageView we've changed
|
||||
*
|
||||
* @param v
|
||||
* ImageView displaying bitmap data
|
||||
*/
|
||||
void updateView(ImageView v) {
|
||||
if (drawable == null)
|
||||
drawable = createDrawable();
|
||||
v.setImageDrawable(drawable);
|
||||
v.invalidate();
|
||||
}
|
||||
/**
|
||||
* Call in UI thread; tell ImageView we've changed
|
||||
*
|
||||
* @param v ImageView displaying bitmap data
|
||||
*/
|
||||
void updateView(ImageView v) {
|
||||
if (drawable == null)
|
||||
drawable = createDrawable();
|
||||
|
||||
/**
|
||||
* Copy a rectangle from one part of the bitmap to another
|
||||
*
|
||||
* @param src
|
||||
* Rectangle in full-frame coordinates to be copied
|
||||
* @param dest
|
||||
* Destination rectangle in full-frame coordinates
|
||||
* @param paint
|
||||
* Paint specifier
|
||||
*/
|
||||
abstract void copyRect(Rect src, Rect dest, Paint paint);
|
||||
if (drawable != null) {
|
||||
v.setImageDrawable(drawable);
|
||||
v.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a rectangle in the bitmap with coordinates given in full frame
|
||||
*
|
||||
* @param x
|
||||
* Top left x
|
||||
* @param y
|
||||
* Top left y
|
||||
* @param w
|
||||
* width (pixels)
|
||||
* @param h
|
||||
* height (pixels)
|
||||
* @param paint
|
||||
* How to draw
|
||||
*/
|
||||
abstract void drawRect(int x, int y, int w, int h, Paint paint);
|
||||
/**
|
||||
* Copy a rectangle from one part of the bitmap to another
|
||||
*
|
||||
* @param src Rectangle in full-frame coordinates to be copied
|
||||
* @param dest Destination rectangle in full-frame coordinates
|
||||
* @param paint Paint specifier
|
||||
*/
|
||||
abstract void copyRect(Rect src, Rect dest, Paint paint);
|
||||
|
||||
/**
|
||||
* Scroll position has changed.
|
||||
* <p>
|
||||
* This method is called in the UI thread-- it updates internal status, but
|
||||
* does not change the bitmap data or send a network request until
|
||||
* syncScroll is called
|
||||
*
|
||||
* @param newx
|
||||
* Position of left edge of visible part in full-frame
|
||||
* coordinates
|
||||
* @param newy
|
||||
* Position of top edge of visible part in full-frame coordinates
|
||||
*/
|
||||
abstract void scrollChanged(int newx, int newy);
|
||||
/**
|
||||
* Draw a rectangle in the bitmap with coordinates given in full frame
|
||||
*
|
||||
* @param x Top left x
|
||||
* @param y Top left y
|
||||
* @param w width (pixels)
|
||||
* @param h height (pixels)
|
||||
* @param paint How to draw
|
||||
*/
|
||||
abstract void drawRect(int x, int y, int w, int h, Paint paint);
|
||||
|
||||
/**
|
||||
* Sync scroll -- called from network thread; copies scroll changes from UI
|
||||
* to network state
|
||||
*/
|
||||
abstract void syncScroll();
|
||||
/**
|
||||
* Scroll position has changed.
|
||||
* <p>
|
||||
* This method is called in the UI thread-- it updates internal status, but
|
||||
* does not change the bitmap data or send a network request until
|
||||
* syncScroll is called
|
||||
*
|
||||
* @param newx Position of left edge of visible part in full-frame
|
||||
* coordinates
|
||||
* @param newy Position of top edge of visible part in full-frame coordinates
|
||||
*/
|
||||
abstract void scrollChanged(int newx, int newy);
|
||||
|
||||
/**
|
||||
* Release resources
|
||||
*/
|
||||
void dispose() {
|
||||
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH)
|
||||
if (mbitmap != null)
|
||||
mbitmap.recycle();
|
||||
memGraphics = null;
|
||||
bitmapPixels = null;
|
||||
}
|
||||
/**
|
||||
* Sync scroll -- called from network thread; copies scroll changes from UI
|
||||
* to network state
|
||||
*/
|
||||
abstract void syncScroll();
|
||||
|
||||
/**
|
||||
* Release resources
|
||||
*/
|
||||
void dispose() {
|
||||
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH)
|
||||
if (mbitmap != null)
|
||||
mbitmap.recycle();
|
||||
memGraphics = null;
|
||||
bitmapPixels = null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2055,6 +2055,17 @@ public class VncCanvas extends AppCompatImageView {
|
|||
activity.onDisconnected();
|
||||
}
|
||||
|
||||
public float getFramebufferWidth() {
|
||||
return bitmapData.framebufferwidth;
|
||||
}
|
||||
|
||||
public float getFramebufferHeight() {
|
||||
return bitmapData.framebufferheight;
|
||||
}
|
||||
|
||||
public AbstractBitmapData getBitmapData() {
|
||||
return bitmapData;
|
||||
}
|
||||
|
||||
class VNCOnTouchListener implements View.OnTouchListener {
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
53
app/src/main/java/android/androidVNC/VncCursorView.java
Normal file
53
app/src/main/java/android/androidVNC/VncCursorView.java
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
package android.androidVNC;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.vectras.vm.R;
|
||||
|
||||
public class VncCursorView extends View {
|
||||
|
||||
private Bitmap cursor;
|
||||
private float x, y;
|
||||
|
||||
public VncCursorView(Context context) {
|
||||
super(context);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public VncCursorView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public VncCursorView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(context);
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
cursor = BitmapFactory.decodeResource(
|
||||
context.getResources(),
|
||||
R.drawable.xc_left_ptr
|
||||
);
|
||||
}
|
||||
|
||||
public void update(float x, float y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(@NonNull Canvas canvas) {
|
||||
if (cursor != null) {
|
||||
canvas.drawBitmap(cursor, x, y, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1143,4 +1143,16 @@ public class MainSettingsManager extends AppCompatActivity
|
|||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
return prefs.getBoolean("showLastCrashLog", false);
|
||||
}
|
||||
|
||||
public static void setShowVirtualMouse(Context context, Boolean _boolean) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
SharedPreferences.Editor edit = prefs.edit();
|
||||
edit.putBoolean("showVirtualMouse", _boolean);
|
||||
edit.apply();
|
||||
}
|
||||
|
||||
public static Boolean getShowVirtualMouse(Context context) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
return prefs.getBoolean("showVirtualMouse", false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class MainVNCActivity extends VncCanvasActivity {
|
|||
private final String TAG = "MainVNCActivity";
|
||||
public static MainVNCActivity getContext;
|
||||
private final int retryLimit = 3;
|
||||
private ActivityVncBinding binding;
|
||||
public ActivityVncBinding binding;
|
||||
private ControlsFragmentBinding bindingControls;
|
||||
private DesktopControlsBinding bindingDesktopControls;
|
||||
private GameControlsBinding bindingGameControls;
|
||||
|
|
@ -163,6 +163,8 @@ public class MainVNCActivity extends VncCanvasActivity {
|
|||
// Do not attempt to reconnect while connected.
|
||||
reconnect();
|
||||
});
|
||||
|
||||
binding.cursorView.setVisibility(MainSettingsManager.getShowVirtualMouse(this) || VMManager.isNeedUseVirtualMouse() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
private void setDefaulViewMode() {
|
||||
|
|
@ -668,7 +670,7 @@ public class MainVNCActivity extends VncCanvasActivity {
|
|||
} else {
|
||||
try {
|
||||
return super.dispatchKeyEvent(event);
|
||||
} catch (ClassCastException e) {
|
||||
} catch (Exception e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -767,6 +769,7 @@ public class MainVNCActivity extends VncCanvasActivity {
|
|||
|
||||
binding.lnNosignal.setVisibility(View.GONE);
|
||||
this.vncCanvas.setFocusableInTouchMode(true);
|
||||
syncCursorViewWithBitmap();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1081,9 +1084,14 @@ public class MainVNCActivity extends VncCanvasActivity {
|
|||
});
|
||||
|
||||
bindingDesktopControls.middleBtn.setOnClickListener(v -> {
|
||||
MotionEvent e = MotionEvent.obtain(1000, 1000, MotionEvent.ACTION_DOWN, vncCanvas.mouseX, vncCanvas.mouseY,
|
||||
0);
|
||||
((TouchpadInputHandler) VncCanvasActivity.inputHandler).middleClick(e);
|
||||
try {
|
||||
MotionEvent e = MotionEvent.obtain(1000, 1000, MotionEvent.ACTION_DOWN, vncCanvas.mouseX, vncCanvas.mouseY,
|
||||
0);
|
||||
((TouchpadInputHandler) VncCanvasActivity.inputHandler).middleClick(e);
|
||||
} catch (Exception e) {
|
||||
VMManager.sendMiddleMouseKey();
|
||||
VMManager.sendMiddleMouseKey();
|
||||
}
|
||||
});
|
||||
|
||||
bindingDesktopControls.leftClickBtn.setOnClickListener(v -> {
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ public class VMCreatorActivity extends AppCompatActivity {
|
|||
.into(binding.ivIcon);
|
||||
} else {
|
||||
binding.ivAddThubnail.setImageResource(R.drawable.round_add_24);
|
||||
VMManager.setIconWithName(binding.ivIcon, current.itemName);
|
||||
VMManager.setIconWithName(binding.ivIcon, Objects.requireNonNull(binding.title.getText()).toString());
|
||||
}
|
||||
} else {
|
||||
binding.ivAddThubnail.setImageResource(R.drawable.round_add_24);
|
||||
|
|
|
|||
|
|
@ -222,6 +222,8 @@ public class VMManager {
|
|||
return result.toString();
|
||||
}
|
||||
|
||||
//This can be removed because QMP currently uses sockets instead of open ports.
|
||||
@Deprecated
|
||||
public static int startRandomPort() {
|
||||
int _result;
|
||||
Random _random = new Random();
|
||||
|
|
@ -229,13 +231,15 @@ public class VMManager {
|
|||
int _max = 65535;
|
||||
_result = _random.nextInt(_max - _min + 1) + _min;
|
||||
|
||||
if (FileUtils.isFileExists(AppConfig.romsdatajson)) {
|
||||
if (FileUtils.isFileExists(AppConfig.romsdatajson) || FileUtils.canRead(AppConfig.romsdatajson)) {
|
||||
if (FileUtils.readAFile(AppConfig.romsdatajson).contains("\"qmpPort\":" + _result)) {
|
||||
_result = _random.nextInt(_max - _min + 1) + _min;
|
||||
}
|
||||
if (FileUtils.readAFile(AppConfig.romsdatajson).contains("\"qmpPort\":" + _result)) {
|
||||
_result = _random.nextInt(_max - _min + 1) + _min;
|
||||
}
|
||||
} else {
|
||||
_result = 8080;
|
||||
}
|
||||
|
||||
return _result;
|
||||
|
|
@ -985,6 +989,12 @@ public class VMManager {
|
|||
_dialog.dismiss();
|
||||
});
|
||||
|
||||
_view.findViewById(R.id.ln_virtualmouse).setOnClickListener(v -> {
|
||||
MainVNCActivity.getContext.binding.cursorView.setVisibility(MainVNCActivity.getContext.binding.cursorView.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
|
||||
MainSettingsManager.setShowVirtualMouse(_activity, MainVNCActivity.getContext.binding.cursorView.getVisibility() == View.VISIBLE);
|
||||
_dialog.dismiss();
|
||||
});
|
||||
|
||||
_view.findViewById(R.id.ln_mouse).setOnClickListener(v -> {
|
||||
MainVNCActivity.getContext.onMouseMode();
|
||||
_dialog.dismiss();
|
||||
|
|
@ -1356,6 +1366,14 @@ public class VMManager {
|
|||
|| _qemuCommand.contains("-machine pc-q35");
|
||||
}
|
||||
|
||||
public static boolean isNeedUseVirtualMouse() {
|
||||
return lastQemuCommand.contains("-vga qxl") ||
|
||||
lastQemuCommand.contains("-vga virtio") ||
|
||||
lastQemuCommand.contains("-device qxl-vga") ||
|
||||
lastQemuCommand.contains("-device virtio-vga") ||
|
||||
lastQemuCommand.contains("-device virtio-gpu");
|
||||
}
|
||||
|
||||
public static String addAudioDevSdl(String env) {
|
||||
final String audioDevParam = ",audiodev=defaultaudiodev -audiodev sdl,id=defaultaudiodev ";
|
||||
String result = env;
|
||||
|
|
|
|||
|
|
@ -598,18 +598,19 @@ public class FileUtils {
|
|||
public static boolean moveFile(String oldfilename, String newFolderPath, String newFilename) {
|
||||
File folder = new File(newFolderPath);
|
||||
if (!folder.exists())
|
||||
folder.mkdirs();
|
||||
folder.mkdirs();
|
||||
|
||||
File oldfile = new File(oldfilename);
|
||||
File newFile = new File(newFolderPath, newFilename);
|
||||
|
||||
if (!newFile.exists())
|
||||
try {
|
||||
newFile.createNewFile();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!newFile.exists()) {
|
||||
try {
|
||||
newFile.createNewFile();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return oldfile.renameTo(newFile);
|
||||
}
|
||||
|
||||
|
|
@ -739,6 +740,11 @@ public class FileUtils {
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean canRead(String filePath) {
|
||||
File file = new File(filePath);
|
||||
return file.canRead();
|
||||
}
|
||||
|
||||
public static String readAFile(String filePath) {
|
||||
StringBuilder content = new StringBuilder();
|
||||
try (FileInputStream inputStream = new FileInputStream(filePath);
|
||||
|
|
|
|||
10
app/src/main/res/drawable/highlight_mouse_cursor_24px.xml
Normal file
10
app/src/main/res/drawable/highlight_mouse_cursor_24px.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M516,878Q507,880 498,880Q489,880 480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,489 880,498Q880,507 878,516L800,492L800,480Q800,346 707,253Q614,160 480,160Q346,160 253,253Q160,346 160,480Q160,614 253,707Q346,800 480,800Q483,800 486,800Q489,800 492,800L516,878ZM821,900L650,729L600,880L480,480L880,600L729,650L900,821L821,900Z"/>
|
||||
</vector>
|
||||
BIN
app/src/main/res/drawable/xc_left_ptr.png
Normal file
BIN
app/src/main/res/drawable/xc_left_ptr.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 145 B |
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#000000"
|
||||
|
|
@ -20,19 +20,30 @@
|
|||
android:layout_centerVertical="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.androidVNC.VncCanvas
|
||||
android:id="@+id/vnc_canvas"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:keepScreenOn="true" />
|
||||
|
||||
<android.androidVNC.VncCanvas
|
||||
android:id="@+id/vnc_canvas"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:keepScreenOn="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/cursorViewContianer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
<android.androidVNC.VncCursorView
|
||||
android:id="@+id/cursorView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/controlsfragment"
|
||||
layout="@layout/controls_fragment" />
|
||||
|
||||
<include
|
||||
android:id="@+id/sendkeysdialog"
|
||||
layout="@layout/send_key_dialog" />
|
||||
|
|
@ -41,9 +52,9 @@
|
|||
android:id="@+id/ln_nosignal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#E6000000"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:background="#E6000000">
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
|
|
@ -55,15 +66,15 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:textSize="20sp"
|
||||
android:text="@string/no_signal"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tap_to_try_again"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:textColor="@android:color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -219,6 +219,26 @@
|
|||
android:text="@string/refresh"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ln_virtualmouse"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/highlight_mouse_cursor_24px"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:textColor="?attr/colorControlNormal"
|
||||
android:text="@string/show_virtual_mouse"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ln_mouse"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -491,6 +491,8 @@
|
|||
<string name="threedfx_is_not_available">3dfx is not available.</string>
|
||||
<string name="refresh">Refresh</string>
|
||||
<string name="last_crash_note">We are very sorry about an incident that occurred and app crashed earlier.</string>
|
||||
<string name="show_virtual_mouse">Show virtual mouse</string>
|
||||
<string name="hide_virtual_mouse">Hide virtual mouse</string>
|
||||
|
||||
|
||||
<!--======================TERMUX STRINGS====================-->
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
"url": "https://github.com/xoureldeen/Vectras-VM-Android/releases",
|
||||
"Message": "<h2>3.5.0</h2>\n3dfx is back!",
|
||||
"cancellable": true,
|
||||
"versionCodeBeta":"63",
|
||||
"versionNameBeta":"3.5.9",
|
||||
"versionNameBetas":"3.0.0,3.1.0,3.2.1,3.2.2,3.2.3,3.2.4,3.2.5,3.2.6,3.2.7,3.2.8,3.2.9,3.2.10,3.3.1,3.3.2,3.3.3,3.3.4,3.3.5,3.3.6,3.3.7,3.3.8,3.3.9,3.4.1,3.4.2,3.4.3,3.4.4,3.4.5,3.4.6,3.4.7,3.4.8,3.4.9,3.5.1,3.5.2,3.5.3,3.5.4,3.5.5,3.5.6,3.5.7,3.5.8,3.5.9",
|
||||
"versionCodeBeta":"64",
|
||||
"versionNameBeta":"3.6.0",
|
||||
"versionNameBetas":"3.0.0,3.1.0,3.2.1,3.2.2,3.2.3,3.2.4,3.2.5,3.2.6,3.2.7,3.2.8,3.2.9,3.2.10,3.3.1,3.3.2,3.3.3,3.3.4,3.3.5,3.3.6,3.3.7,3.3.8,3.3.9,3.4.1,3.4.2,3.4.3,3.4.4,3.4.5,3.4.6,3.4.7,3.4.8,3.4.9,3.5.1,3.5.2,3.5.3,3.5.4,3.5.5,3.5.6,3.5.7,3.5.8,3.5.9,3.6.0",
|
||||
"sizeBeta": "43 MB",
|
||||
"urlBeta": "https://github.com/AnBui2004/Vectras-VM-Emu-Android/releases",
|
||||
"MessageBeta": "<h2>3.5.9</h2>Bugs fixed.",
|
||||
"MessageBeta": "<h2>3.6.0</h2>Bugs fixed.",
|
||||
"cancellableBeta": true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue