void ViewArchive(const char * path)
{
FileListing listing { path };
- char string[MAX_LOCATION], * directory;
+ char string[MAX_LOCATION];
+ const char * directory;
DataRow row;
SplitArchivePath(path, string, &directory);
"m",
"dl",
"pthread",
- "X11"
+ "X11",
+ "freetype"
]
}
},
xDisplay.image = XShmCreateImage(xGlobalDisplay, xSystemVisual /*DefaultVisual(xGlobalDisplay, DefaultScreen(xGlobalDisplay))*/,
format->depth, ZPixmap, null, &xDisplay.shminfo, width, height);
}
+ else if(display.useSharedMemory && !xSharedMemory)
+ printf("%s", $"Error: Requested shared memory but shared memory pixmaps are not supported by X server.\n");
#endif
if(xDisplay.image)
{
static bool paused;
static Semaphore pauseSemaphore { };
-static char *device = "default";
+static const char *device = "default";
static snd_mixer_t *mixer_handle;
{
snd_mixer_elem_t *elem;
snd_mixer_selem_id_t *sid;
- int pmin, pmax;
- int get_vol, set_vol;
+ long pmin, pmax;
+ int set_vol;
float f_multi;
snd_mixer_load(mixer_handle);
snd_mixer_elem_t *elem;
snd_mixer_selem_id_t *sid;
long pmin, pmax;
- long get_vol, set_vol;
+ long set_vol;
float f_multi;
snd_mixer_load(mixer_handle);
public int OpenAudio(AudioSpec wanted, AudioSpec result)
{
int err;
- unsigned int i;
buffer = new byte[wanted.samples * wanted.channels * wanted.bits / 8];
memset(buffer, 0, wanted.samples * wanted.channels * wanted.bits / 8);
frames = snd_pcm_writei(handle, buffer, numSamples);
if(frames < 0)
- frames = snd_pcm_recover(handle, frames, 0);
+ frames = snd_pcm_recover(handle, (int)frames, 0);
if (frames < 0)
{
- printf("snd_pcm_writei failed: %s\n", snd_strerror(frames));
+ printf("snd_pcm_writei failed: %s\n", snd_strerror((int)frames));
break;
}
if (frames > 0 && frames < numSamples)
- printf("Short write (expected %li, wrote %li)\n", numSamples, frames);
+ printf("Short write (expected %ui, wrote %li)\n", numSamples, frames);
}
}
return 0;
static void OutputLog(const char * string)
{
#ifdef MAKEFILE_GENERATOR
- printf(string);
+ printf("%s", string);
#else
ide.outputView.buildBox.Log(string);
#endif
"ecere"
]
},
+ "Platforms" : [
+ {
+ "Name" : "linux",
+ "Options" : {
+ "Libraries" : [
+ "m"
+ ]
+ }
+ },
+ {
+ "Name" : "apple",
+ "Options" : {
+ "Libraries" : [
+ "m"
+ ]
+ }
+ }
+ ],
"Configurations" : [
{
"Name" : "Debug",
Camera camera
{
type = fixed;
- position = { 0, -1000, 0 };
+ position = { 0, -275, 0 };
zMin = 0.1f,
orientation = Euler { 0, 90, 0 };
};
Mesh mesh;
material.baseMap = image.bitmap;
plane.Create(displaySystem);
- //plane.transform.scaling = { 20 / 2 / 0.707, 20 /2 / 0.707f, 20 /2/ 0.707f };
- plane.transform.scaling = { 1.0f, 1.5f, 1.0f };
+ plane.transform.scaling = { 1, 1, 1 };
// plane.transform.scaling = { image.bitmap.width, 1.5f, image.bitmap.height };
//plane.transform.scaling = { Max(image.bitmap.width, image.bitmap.height), 1.5f, Max(image.bitmap.width, image.bitmap.height) };
if(!image.bitmap) return false;
w = image.bitmap.width;
h = image.bitmap.height;
- camera.position.y = -Max(image.bitmap.height, image.bitmap.height);
+ camera.position.y = -Max(image.bitmap.height, image.bitmap.height) / sqrt(2);
plane.UpdateTransform();
{
Size size = initSize;
Anchor anchor = this.anchor;
- Bitmap bitmap = image ? image.bitmap : null;
-
- if(!size.w && (!anchor.left.type || !anchor.right.type))
+ if(image && image.bitmap)
{
- if(bitmap)
- *w = (int)(bitmap.width * zoom / 0.707);
- else
- *w = 80;
+ Bitmap bitmap = image.bitmap;
+ double m = Max(bitmap.width, bitmap.height) * zoom * sqrt(2);
+ if(!size.w && (!anchor.left.type || !anchor.right.type))
+ *w = (int)m;
+ if(!size.h && (!anchor.top.type || !anchor.bottom.type))
+ *h = (int)m;
}
-
- if(!size.h && (!anchor.top.type || !anchor.bottom.type))
+ else
{
- if(bitmap)
- *h = (int)(bitmap.height * zoom / 0.707);
- else
+ if(!size.w && (!anchor.left.type || !anchor.right.type))
+ *w = 80;
+ if(!size.h && (!anchor.top.type || !anchor.bottom.type))
*h = 80;
}
return true;
static int startY, startX;
static bool rotating;
-PictureRotate megan
+PictureRotate pic
{
displayDriver = "OpenGL",
background = 0,
class Form1 : Window
{
+#if defined(__linux__)
+ displayDriver = "OpenGL";
+#endif
alphaBlend = true;
- text = "Form1";
+ caption = "Form1";
background = activeBorder;
borderStyle = sizable;
hasMaximize = true;
size = { 640, 480 };
nativeDecorations = false;
- Button button1 { this, text = "button1", position = { 440, 152 } };
- DropBox dropBox1 { this, text = "dropBox1", position = { 208, 88 } };
- ListBox listBox1 { this, text = "listBox1", position = { 304, 280 } };
- EditBox editBox1 { this, text = "editBox1", position = { 96, 184 } };
- Label label1 { this, text = "label1", position = { 432, 248 } };
- ScrollBar scrollBar1 { this, text = "scrollBar1", position = { 488, 360 } };
+ Button button1 { this, caption = "button1", position = { 440, 152 } };
+ DropBox dropBox1 { this, caption = "dropBox1", position = { 208, 88 } };
+ ListBox listBox1 { this, caption = "listBox1", position = { 304, 280 } };
+ EditBox editBox1 { this, caption = "editBox1", position = { 96, 184 } };
+ Label label1 { this, caption = "label1", position = { 432, 248 } };
+ ScrollBar scrollBar1 { this, caption = "scrollBar1", position = { 488, 360 } };
}
Form1 form1 {};
class Snowing : Window
{
- text = "Snowing";
+ caption = "Snowing";
background = backgroundColor;
opacity = 0;
drawBehind = false;