mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05: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
|
|
@ -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