#endif
}
-void maruskin_sdl_init(int swt_handle, int lcd_size_width, int lcd_size_height)
+void maruskin_sdl_init(uint64 swt_handle, int lcd_size_width, int lcd_size_height)
{
int w, h;
gchar SDL_windowhack[32];
#define SDL_USER_EVENT_CODE_HARDKEY 1
void maruskin_display_init(DisplayState *ds);
-void maruskin_sdl_init(int swt_handle, int lcd_size_width, int lcd_size_height);
+void maruskin_sdl_init(uint64 swt_handle, int lcd_size_width, int lcd_size_height);
void maruskin_sdl_resize(void);
DisplaySurface* get_qemu_display_surface( void );
private ScreenShotDialog screenShotDialog;
private SocketCommunicator communicator;
- private int windowHandleId;
+ private long windowHandleId;
private Listener shellCloseListener;
private PaintListener shellPaintListener;
this.communicator = communicator;
}
- public int compose() {
+ public long compose() {
this.lcdCanvas = new Canvas( shell, SWT.EMBEDDED );
//
// }
- private int getWindowHandleId() {
+ private long getWindowHandleId() {
- int windowHandleId = 0;
+ long windowHandleId = 0;
if ( SkinUtil.isLinuxPlatform() ) {
try {
Field field = lcdCanvas.getClass().getField( "embeddedHandle" );
- windowHandleId = field.getInt( lcdCanvas );
+ windowHandleId = field.getLong( lcdCanvas );
logger.info( "lcdCanvas.embeddedHandle:" + windowHandleId );
} catch ( IllegalArgumentException e ) {
logger.log( Level.SEVERE, e.getMessage(), e );
boolean isOnTop = Boolean.parseBoolean( onTopVal );
EmulatorSkin skin = new EmulatorSkin( config, isOnTop );
- int windowHandleId = skin.compose();
+ long windowHandleId = skin.compose();
int uid = config.getArgInt( ArgsConstants.UID );
communicator = new SocketCommunicator( config, uid, windowHandleId, skin );
private EmulatorConfig config;
private int uId;
- private int windowHandleId;
+ private long windowHandleId;
private EmulatorSkin skin;
private Socket socket;
private Thread sendThread;
private LinkedList<SkinSendData> sendQueue;
- public SocketCommunicator( EmulatorConfig config, int uId, int windowHandleId, EmulatorSkin skin ) {
+ public SocketCommunicator( EmulatorConfig config, int uId, long windowHandleId, EmulatorSkin skin ) {
this.config = config;
this.uId = uId;
// has to be portrait mode at first booting time
short rotation = EmulatorConfig.DEFAULT_WINDOW_ROTATION;
StartData startData = new StartData( windowHandleId, width, height, scale, rotation );
+ logger.info("StartData" + startData);
sendToQEMU( SendCommand.SEND_START, startData );
dos.writeInt( val );
}
- protected void writeLong ( int val ) throws IOException {
+ protected void writeLong ( long val ) throws IOException {
dos.writeLong( val );
}
*/
public class StartData extends AbstractSendData {
- private int windowHandleId;
+ private long windowHandleId;
private int lcdSizeWidth;
private int lcdSizeHeight;
private int scale;
private short rotation;
- public StartData(int windowHandleId, int lcdSizeWidth, int lcdSizeHeight, int scale, short rotation ) {
+ public StartData(long windowHandleId, int lcdSizeWidth, int lcdSizeHeight, int scale, short rotation ) {
this.windowHandleId = windowHandleId;
this.lcdSizeWidth = lcdSizeWidth;
this.lcdSizeHeight = lcdSizeHeight;
@Override
protected void write() throws IOException {
- writeInt( windowHandleId );
+ writeLong( windowHandleId );
writeInt( lcdSizeWidth );
writeInt( lcdSizeHeight );
writeInt( scale );
#include "maruskin_keymap.h"
#include "emul_state.h"
#include "hw/maru_pm.h"
-#include "qemu-common.h"
#include "sysemu.h"
#ifdef _WIN32
static void* run_timed_shutdown_thread( void* args );
static void send_to_emuld( const char* request_type, int request_size, const char* send_buf, int buf_size );
-void start_display( int handle_id, int lcd_size_width, int lcd_size_height, double scale_factor, short rotation_type )
+void start_display(uint64 handle_id, int lcd_size_width, int lcd_size_height, double scale_factor, short rotation_type)
{
- INFO( "start_display handle_id:%d, lcd size:%dx%d, scale_factor:%lf, rotation_type:%d\n",
+ INFO( "start_display handle_id:%ld, lcd size:%dx%d, scale_factor:%lf, rotation_type:%d\n",
handle_id, lcd_size_width, lcd_size_height, scale_factor, rotation_type );
set_emul_win_scale(scale_factor);
#ifndef MARUSKIN_OPERATION_H_
#define MARUSKIN_OPERATION_H_
+#include "qemu-common.h"
+
+
extern int ret_hax_init;
struct QemuSurfaceInfo {
};
typedef struct DetailInfo DetailInfo;
-void start_display( int handle_id, int lcd_size_width, int lcd_size_height, double scale_factor, short rotation_type );
+void start_display(uint64 handle_id, int lcd_size_width, int lcd_size_height, double scale_factor, short rotation_type);
void do_mouse_event( int event_type, int x, int y, int z );
}
/* keep it consistent with emulator-skin definition */
- int handle_id = 0;
+ uint64 handle_id = 0;
int lcd_size_width = 0;
int lcd_size_height = 0;
int scale = 0;
p += sizeof( scale );
memcpy( &rotation, p, sizeof( rotation ) );
- handle_id = ntohl( handle_id );
+ int low_id = (int)handle_id;
+ int high_id = (int)(handle_id >> 32);
+ low_id = ntohl(high_id);
+ high_id = ntohl(low_id);
+ handle_id = high_id;
+ handle_id = (handle_id << 32) | low_id;
+
lcd_size_width = ntohl( lcd_size_width );
lcd_size_height = ntohl( lcd_size_height );
scale = ntohl( scale );