mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Get checkwps working again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19880 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d4b99fdfe0
commit
36c71a60ca
7 changed files with 66 additions and 21 deletions
|
@ -22,7 +22,6 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "gwps.h"
|
||||
#include "file.h"
|
||||
#include "misc.h"
|
||||
#include "plugin.h"
|
||||
|
@ -32,30 +31,24 @@
|
|||
#include "proxy.h"
|
||||
#include "settings.h"
|
||||
#include "sysfont.h"
|
||||
#include "gwps.h"
|
||||
#include "font.h"
|
||||
#include "bmp.h"
|
||||
#include "backdrop.h"
|
||||
#include "ctype.h"
|
||||
#else
|
||||
#include "checkwps.h"
|
||||
#define SYSFONT_HEIGHT 8
|
||||
#include "audio.h"
|
||||
#define DEBUGF printf
|
||||
#endif /*WPSEDITOR*/
|
||||
#define FONT_SYSFIXED 0
|
||||
#define FONT_UI 1
|
||||
#else
|
||||
#include "debug.h"
|
||||
#endif /*__PCTOOL__*/
|
||||
|
||||
#ifndef __PCTOOL__
|
||||
#include <ctype.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "font.h"
|
||||
|
||||
#include "gwps.h"
|
||||
#ifndef __PCTOOL__
|
||||
#include "settings.h"
|
||||
#endif
|
||||
#include "settings_list.h"
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
@ -64,8 +57,6 @@
|
|||
|
||||
#include "backdrop.h"
|
||||
|
||||
#endif
|
||||
|
||||
#define WPS_DEFAULTCFG WPS_DIR "/rockbox_default.wps"
|
||||
#define RWPS_DEFAULTCFG WPS_DIR "/rockbox_default.rwps"
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#endif
|
||||
#include "lcd.h"
|
||||
#include "file.h"
|
||||
#include "bmp.h"
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
#include "lcd-remote.h"
|
||||
#endif
|
||||
|
@ -58,9 +59,9 @@
|
|||
#ifndef __PCTOOL__
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "bmp.h"
|
||||
#include "resize.h"
|
||||
#else
|
||||
#include "checkwps.h"
|
||||
#undef DEBUGF
|
||||
#define DEBUGF(...)
|
||||
#endif
|
||||
|
|
|
@ -68,11 +68,11 @@ int button_apply_acceleration(const unsigned int data);
|
|||
#define BUTTON_TOUCHSCREEN 0x08000000
|
||||
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
#if !defined(BUTTON_TOPLEFT) || !defined(BUTTON_TOPMIDDLE) \
|
||||
#if (!defined(BUTTON_TOPLEFT) || !defined(BUTTON_TOPMIDDLE) \
|
||||
|| !defined(BUTTON_TOPRIGHT) || !defined(BUTTON_MIDLEFT) \
|
||||
|| !defined(BUTTON_CENTER) || !defined(BUTTON_MIDRIGHT) \
|
||||
|| !defined(BUTTON_BOTTOMLEFT) || !defined(BUTTON_BOTTOMMIDDLE) \
|
||||
|| !defined(BUTTON_BOTTOMRIGHT)
|
||||
|| !defined(BUTTON_BOTTOMRIGHT)) && !defined(__PCTOOL__)
|
||||
#error Touchscreen button mode BUTTON_* defines not set up correctly
|
||||
#endif
|
||||
enum touchscreen_mode {
|
||||
|
|
|
@ -62,11 +62,13 @@
|
|||
* must be available at system startup.
|
||||
* Fonts are specified in firmware/font.c.
|
||||
*/
|
||||
#ifndef __PCTOOL__
|
||||
enum {
|
||||
FONT_SYSFIXED, /* system fixed pitch font*/
|
||||
FONT_UI, /* system porportional font*/
|
||||
MAXFONTS
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* .fnt loadable font file format definition
|
||||
|
|
|
@ -27,9 +27,10 @@ COMMON=$(ROOT)/apps/gui/wps_parser.c \
|
|||
INCLUDE=-I $(ROOT)/apps/gui \
|
||||
-I $(ROOT)/firmware/export \
|
||||
-I $(ROOT)/apps \
|
||||
-I $(ROOT)/apps/recorder \
|
||||
-I .
|
||||
|
||||
CFLAGS = -g -D__PCTOOL__ -DDEBUG -DROCKBOX_DIR_LEN=9 -DWPS_DIR=\".\"
|
||||
CFLAGS = -g -D__PCTOOL__ -DDEBUG -DROCKBOX_DIR_LEN=9 -DWPS_DIR=\".\"
|
||||
|
||||
all:
|
||||
@echo To build, run the buildall.sh script
|
||||
|
|
|
@ -25,14 +25,16 @@
|
|||
#include "config.h"
|
||||
#include "gwps.h"
|
||||
#include "checkwps.h"
|
||||
|
||||
#define MIN(x,y) ((x) > (y) ? (y) : (x))
|
||||
#include "resize.h"
|
||||
|
||||
bool debug_wps = true;
|
||||
int wps_verbose_level = 0;
|
||||
|
||||
int errno;
|
||||
|
||||
const struct settings_list *settings;
|
||||
const int nb_settings = 0;
|
||||
|
||||
/* static endianness conversion */
|
||||
#define SWAP_16(x) ((typeof(x))(unsigned short)(((unsigned short)(x) >> 8) | \
|
||||
((unsigned short)(x) << 8)))
|
||||
|
@ -55,6 +57,20 @@ unsigned short letoh16(unsigned short x)
|
|||
}
|
||||
}
|
||||
|
||||
unsigned short letoh32(unsigned short x)
|
||||
{
|
||||
unsigned short n = 0x1234;
|
||||
unsigned char* ch = (unsigned char*)&n;
|
||||
|
||||
if (*ch == 0x34)
|
||||
{
|
||||
/* Little-endian */
|
||||
return x;
|
||||
} else {
|
||||
return SWAP_32(x);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int htole32(unsigned int x)
|
||||
{
|
||||
unsigned short n = 0x1234;
|
||||
|
@ -109,6 +125,38 @@ bool load_remote_wps_backdrop(const char* filename)
|
|||
return true;
|
||||
}
|
||||
|
||||
int recalc_dimension(struct dim *dst, struct dim *src)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int resize_on_load(struct bitmap *bm, bool dither, struct dim *src,
|
||||
struct rowset *rset, unsigned char *buf, unsigned int len,
|
||||
const struct custom_format *format,
|
||||
struct img_part* (*store_part)(void *args),
|
||||
void *args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int audio_status(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct mp3entry* audio_current_track(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void audio_stop(void)
|
||||
{
|
||||
}
|
||||
|
||||
void audio_play(long offset)
|
||||
{
|
||||
}
|
||||
|
||||
static char pluginbuf[PLUGIN_BUFFER_SIZE];
|
||||
|
||||
static unsigned dummy_func2(void)
|
||||
|
|
|
@ -23,20 +23,22 @@
|
|||
#define _CHECKWPS_H_
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
/* subset of global_settings needed to build checkwps. */
|
||||
struct user_settings {
|
||||
bool statusbar;
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
int bg_color; /* background color native format */
|
||||
int fg_color; /* foreground color native format */
|
||||
#endif
|
||||
};
|
||||
|
||||
extern struct user_settings global_settings;
|
||||
|
||||
#define FONT_SYSFIXED 0
|
||||
#define FONT_UI 1
|
||||
#define SYSFONT_HEIGHT 8
|
||||
|
||||
|
||||
#define MIN(x,y) ((x) > (y) ? (y) : (x))
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue